Created
December 11, 2013 19:44
-
-
Save russjr08/7917073 to your computer and use it in GitHub Desktop.
Check if there are any OPs are online.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static boolean anyOpOnline(){ | |
boolean anyPresent = false; | |
for(Player player : Bukkit.getPlayersOnline()){ | |
if(player.isOp()){ | |
anyPresent = true; | |
} | |
} | |
return anyPresent; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment