Allow ops to use minecraft commands

This commit is contained in:
samczsun 2017-02-20 21:52:19 -05:00 committed by cnr
parent b782f5ced9
commit a0e79d87a2

View File

@ -147,8 +147,11 @@ public class Chat extends MiniPlugin
|| event.getMessage().toLowerCase().startsWith("/bukkit") || event.getMessage().toLowerCase().startsWith("/bukkit")
|| event.getMessage().toLowerCase().startsWith("/minecraft")) || event.getMessage().toLowerCase().startsWith("/minecraft"))
{ {
event.getPlayer().sendMessage(F.main(getName(), "Nope, not allowed!")); if (!event.getPlayer().isOp())
event.setCancelled(true); {
event.getPlayer().sendMessage(F.main(getName(), "Nope, not allowed!"));
event.setCancelled(true);
}
} }
} }