mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-26 02:19:48 -05:00
Fix possible NPE
Former-commit-id: 457393a22cecdbbdb4b8190fd24c0d5e6abe2566 [formerly f15e5802f53b03ad2dea8c65f6d44c75dd57ecbd] Former-commit-id: b5ea513f07f68e1cef71d9fa27c51a8f8bad7fb2
This commit is contained in:
1 parent
2427cadb26
commit
d6e044e441
1 file changed
+6
@@ -257,6 +257,12 @@ public class DisplayProtectionListener implements Listener {
|
||||
if (!DisplayItem.checkIsGuardItemStack(event.getCurrentItem())) {
|
||||
return;
|
||||
}
|
||||
if(event.getClickedInventory() == null){
|
||||
return;
|
||||
}
|
||||
if(event.getClickedInventory().getLocation() == null){
|
||||
return;
|
||||
}
|
||||
event.setCancelled(true);
|
||||
sendAlert(Util.getClassPrefix() + "Inventory " + event.getClickedInventory().getLocation()
|
||||
.toString() + " was clicked the displayItem, QuickShop already removed it.");
|
||||
|
||||
Reference in new issue
Block a user