Minecraft PC IP: play.cubecraft.net
  • We're running an internal migration of all old players' stats to our new highly advanced statistics tracking backend. This means that stat changes will be a bit delayed while we ingest this huge backlog of data. Nothing is being lost, it'll just take a bit longer to show up in the in-game UIs.

DrHam

Forum Veteran
Sep 15, 2015
3,615
4,166
518
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

kevin020007 wrote on iTz1Hamood's profile.
Dear Hamood, Thank you for being an amazing friend for me during my cubecraft time with you and your time as bedrock cubecraft moderator and upcoming java cubecraft moderator. Thank you for helping the ccl staff with hosting and the community by hosting pg's and thank you for the great time we had together. I hope to see you back sooner on the battlefield then I can imagine. We love you hamood❤️❤️
Red crits wrote on iTz1Hamood's profile.
Hey Hamood, you were a wonderful team member. Wish you the very best for your future endeavors:) see ya around!
ItzJuan wrote on iTz1Hamood's profile.
Onward with life, good luck from now on!
Noodles. wrote on iTz1Hamood's profile.
The greatest staff member ever. Thank you for your work
Capitan wrote on iTz1Hamood's profile.
Thanks for all your hard work Hamood. We will miss you ♥️
Top Bottom