Skip to content

Instantly share code, notes, and snippets.

@codebucketdev
Last active December 26, 2015 11:29
Show Gist options
  • Save codebucketdev/7144068 to your computer and use it in GitHub Desktop.
Save codebucketdev/7144068 to your computer and use it in GitHub Desktop.
With this snippet, you can send to all Operators a Information about a task...
public void alertOperators(org.bukkit.command.CommandSender sender, String alert)
{
for(Player player : Bukkit.getOnlinePlayers())
{
if(player.isOp())
{
if(!sender.getName().equals(player.getName()))
{
player.sendMessage("§7§o["+sender.getName()+": "+alert+"]");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment