Merge pull request #3 from AtlasMediaGroup/Elmon11-patch-2

checks if a player is OP before opping them
This commit is contained in:
speed 2020-12-01 17:52:54 -05:00 committed by GitHub
commit 495c91f5bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,8 +18,11 @@ public class Command_opall extends FreedomCommand
for (Player player : server.getOnlinePlayers()) for (Player player : server.getOnlinePlayers())
{ {
player.setOp(true); if (!player.isOp())
player.sendMessage(FreedomCommand.YOU_ARE_OP); {
player.setOp(true);
player.sendMessage(FreedomCommand.YOU_ARE_OP);
}
} }
return true; return true;