SNiPeRzCiinema

Only ops can break blocks

Aug 4th, 2012
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.24 KB | None | 0 0
  1. @EventHandler(priority = EventPriority.HIGHEST)
  2. public void onBlockBreak(BlockBreakEvent e) {
  3.     if (e.getPlayer().isOp == false) {
  4.         e.setCancelled(true);
  5.         e.getPlayer().sendMessage("Sorry only ops can break blocks")
  6.     }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment