SHOW:
|
|
- or go back to the newest paste.
1 | @EventHandler | |
2 | public void onOpenMenuKit(PlayerInteractEvent e){ | |
3 | Player p = e.getPlayer(); | |
4 | - | if(e.getItem().getType() == Material.CHEST){ |
4 | + | if(e.getItem() != null |
5 | - | if(GameState.isState(GameState.IN_LOBBY)){ |
5 | + | && e.getItem().getType() == Material.CHEST |
6 | - | if(e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK){ |
6 | + | && GameState.isState(GameState.IN_LOBBY) |
7 | - | openKitInv(p); |
7 | + | && (e.getAction() == Action.RIGHT_CLICK_AIR || e.getAction() == Action.RIGHT_CLICK_BLOCK)) |
8 | - | } |
8 | + | openKitInv(p); |
9 | - | } |
9 | + |