Minecraft PC IP: play.cubecraft.net

DrHam

Forum Professional
Sep 15, 2015
3,615
4,166
558
Kepler-452b
Hello, this will be a group of medium level bukkit/spigot tutorials (no video). This is for broadcasts:

I assume you have alredy created the onCommand method
Code:
 public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
And created your player
Code:
        Player player = (Player)sender;

Now we need to create two ints and a string
Code:
int laengeArray = args.length;
            int indexArray = 0;
            String text = "";

Now we need to get the lenght and use the String that we named "text":
Code:
            for (int i = 0; i < args.length; i++) {
                text = text + args[i] + " ";
            }

Now the message. Here we will use bukkit one.
Code:
        Bukkit.broadcastMessage(ChatColor.DARK_RED + "[Alert] " + ChatColor.RED + text);


I'm noob explaining in text. I know
 
  • Like
Reactions: Buuuddy
Members Online

Latest profile posts

Nathie wrote on Thijs's profile.
Sawubona Thijs! 😍
3415.jpg
A year has passed for this photo..
Every Friday (July 24, 31, August 7, 14) are when more maps and cosmetics are released as part of 5 weeks of Summer!
1784328195255.png
Things that will happen today:
- First week of 5 Weeks of Summer map and cosmetic drops
- The beginning of CubeCraft League BedWars Tournament
- SkyWars Update??? (Not confirmed, but it's a possible shadow drop)
CheatersDontWin wrote on FakeOP's profile.
Happy one :)
Top Bottom