Esempio n. 1
0
 @EventHandler(priority = EventPriority.LOWEST)
 public void PlayerEvent(PlayerBucketEmptyEvent e) {
   if (!plugin.isProtected()) return;
   Location check = e.getPlayer().getTargetBlock(null, 100).getLocation();
   check.add(0, 1, 0);
   if (plugin.checkBoxLarge(check)) e.setCancelled(true);
 }
Esempio n. 2
0
 @EventHandler(priority = EventPriority.LOWEST)
 public void onBlockPlace(BlockPlaceEvent e) {
   if (!plugin.isProtected()) return;
   if (plugin.checkBox(e.getBlock().getLocation())) {
     e.setCancelled(true);
     e.getPlayer().sendMessage("Cannot edit blocks in Town Warp zone");
   }
 }
Esempio n. 3
0
 @EventHandler(priority = EventPriority.LOWEST)
 public void onLiquid(BlockFromToEvent e) {
   if (!plugin.isProtected()) return;
   if (plugin.checkLiq(e.getToBlock().getLocation())) e.setCancelled(true);
 }