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
And created your player
Now we need to create two ints and a string
Now we need to get the lenght and use the String that we named "text":
Now the message. Here we will use bukkit one.
I'm noob explaining in text. I know
I assume you have alredy created the onCommand method
Code:
public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
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