Bukkit.getServer().broadcastMessage("Your message");
for (Player player : Bukkit.getOnlinePlayers()) { player.sendMessage("It works!"); }