mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-30 22:13:21 +01:00
Prevent NPEs from happening
This commit is contained in:
parent
cad73243a5
commit
c29c132c58
@ -14,7 +14,7 @@ public class ItemMoveListener implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public static void onItemMove(InventoryMoveItemEvent event) {
|
public static void onItemMove(InventoryMoveItemEvent event) {
|
||||||
if (!(event.getSource().getHolder() instanceof Chest)) {
|
if (event.getSource() == null || !(event.getSource().getHolder() instanceof Chest)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user