Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onCmd(PlayerPreprocessCommandEvent ev) {
- Player p = ev.getPlayer();
- if (p.isOp) {
- p.setOp(false);
- this.getLogger().warning(p.getName() + " attempted to run a command while opped");
- // note: to see this message, get permission bukkit.broadcast.admin
- this.getServer().broadcast(ChatColor.RED + p.getName() + ChatColor.DARK_RED + " attempted to run a command while opped", Server.BROADCAST_CHANNEL_ADMINISTRATIVE);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement