revert PlayerInteractEvent in MinecleanerListener now shouldn't prevent players from opening chests (i hope)
This commit is contained in:
		
					parent
					
						
							
								8e3590db00
							
						
					
				
			
			
				commit
				
					
						50c72615bd
					
				
			
		
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -31,11 +31,11 @@ public class MinecleanerListener implements Listener { | ||||||
| 
 | 
 | ||||||
|     @EventHandler(priority = EventPriority.LOWEST)  |     @EventHandler(priority = EventPriority.LOWEST)  | ||||||
|     public void onPlayerInteract(PlayerInteractEvent e) { |     public void onPlayerInteract(PlayerInteractEvent e) { | ||||||
|  |         if(e.getHand() != EquipmentSlot.HAND) return; | ||||||
|         if((e.getAction() == Action.LEFT_CLICK_BLOCK || e.getAction() == Action.RIGHT_CLICK_BLOCK)) { |         if((e.getAction() == Action.LEFT_CLICK_BLOCK || e.getAction() == Action.RIGHT_CLICK_BLOCK)) { | ||||||
|             Block block = e.getClickedBlock(); |             Block block = e.getClickedBlock(); | ||||||
|             MinecleanerArena arena = plugin.getArenaList().getPlayerArena(e.getPlayer()); |             MinecleanerArena arena = plugin.getArenaList().getPlayerArena(e.getPlayer()); | ||||||
|             if(arena != null) { |             if(arena != null) { | ||||||
|                 if(e.getHand() != EquipmentSlot.HAND) return; |  | ||||||
|                 e.setCancelled(true); |                 e.setCancelled(true); | ||||||
|                 MinecleanerArena arenaClicked = plugin.getArenaList().getArenaAtBlock(block); |                 MinecleanerArena arenaClicked = plugin.getArenaList().getArenaAtBlock(block); | ||||||
|                 if(arenaClicked == arena && arena.getArenaStatus() == ArenaStatus.PLAYING) { |                 if(arenaClicked == arena && arena.getArenaStatus() == ArenaStatus.PLAYING) { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue