mirror of
https://github.com/amalthea-mc/ShopChest.git
synced 2024-11-09 20:21:07 +00:00
Fixed NPE when player clicks in air
This commit is contained in:
parent
417aaa36d3
commit
bb54c7da67
@ -62,6 +62,7 @@ public class ShopInteractListener implements Listener {
|
||||
Player p = e.getPlayer();
|
||||
Block b = e.getClickedBlock();
|
||||
|
||||
if (e.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||
if (b.getType().equals(Material.CHEST) || b.getType().equals(Material.TRAPPED_CHEST)) {
|
||||
if (e.getAction() == Action.RIGHT_CLICK_BLOCK) {
|
||||
if (ClickType.getPlayerClickType(p) != null) {
|
||||
@ -100,6 +101,7 @@ public class ShopInteractListener implements Listener {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerInteract(PlayerInteractEvent e) {
|
||||
|
Loading…
Reference in New Issue
Block a user