Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. @EventHandler
  2. public void onPlayerInteract(PlayerInteractEvent e) {
  3.  
  4. Player p = e.getPlayer();
  5. @SuppressWarnings("deprecation")
  6. Block block = p.getTargetBlock(null, 20);
  7. if(p.getInventory().getItemInHand()== null){
  8. if(e.getClickedBlock().equals(Material.MOB_SPAWNER)){
  9. if(block.equals(Material.MOB_SPAWNER)){
  10. if(e.getAction().equals(Action.RIGHT_CLICK_BLOCK)){
  11. openGui(p);
  12. }
  13. }
  14. }
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement