Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Help' started by MatthewD, Jun 8, 2018.
Loop through all players and make them perform a command which sends a message? Or what do you mean?
I want everyone to say a certain message.
Bukkit.getOnlinePlayers().stream().forEach(player -> player.chat("The message you want to send"));
This is using Java 8's streams. If you want it Java 7 compat, just loop through all online players using an enhanced for-loop.
Thank's dude! I use Java 8!