Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onPlayerInteract(PlayerInteractEvent e) {
- Player p = e.getPlayer();
- @SuppressWarnings("deprecation")
- Block block = p.getTargetBlock(null, 20);
- if(p.getInventory().getItemInHand()== null){
- if(e.getClickedBlock().equals(Material.MOB_SPAWNER)){
- if(block.equals(Material.MOB_SPAWNER)){
- if(e.getAction().equals(Action.RIGHT_CLICK_BLOCK)){
- openGui(p);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement