Work around internal issue with ender chests

At the moment they can't be shops anyways so this shouldn't have any impact.
This commit is contained in:
Phoenix616 2020-12-20 14:50:57 +01:00
parent 4c44e49c54
commit 9dce41aa30
No known key found for this signature in database
GPG Key ID: 40E2321E71738EB0
1 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.InventoryCloseEvent;
import org.bukkit.event.inventory.InventoryType;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
@ -65,7 +66,7 @@ public class StockCounterModule implements Listener {
@EventHandler
public static void onInventoryClose(InventoryCloseEvent event) {
if (event.getInventory().getLocation() == null || !ChestShopSign.isShopBlock(event.getInventory().getLocation().getBlock())) {
if (event.getInventory().getType() == InventoryType.ENDER_CHEST || event.getInventory().getLocation() == null || !ChestShopSign.isShopBlock(event.getInventory().getLocation().getBlock())) {
return;
}