From 90ae98e59994f1e91b603a5eda4411f4752b1f4b Mon Sep 17 00:00:00 2001 From: DeadSilenceIV Date: Thu, 14 Jul 2022 17:53:27 -0500 Subject: [PATCH] Support for AdvancedChests was updated. (#266) --- pom.xml | 2 +- .../bentobox/level/calculators/IslandLevelCalculator.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index b0c45ca..d49376f 100644 --- a/pom.xml +++ b/pom.xml @@ -209,7 +209,7 @@ com.github.DeadSilenceIV AdvancedChestsAPI - 1.8 + 2.9-BETA provided diff --git a/src/main/java/world/bentobox/level/calculators/IslandLevelCalculator.java b/src/main/java/world/bentobox/level/calculators/IslandLevelCalculator.java index 065f5e0..9c9fb43 100644 --- a/src/main/java/world/bentobox/level/calculators/IslandLevelCalculator.java +++ b/src/main/java/world/bentobox/level/calculators/IslandLevelCalculator.java @@ -425,11 +425,11 @@ public class IslandLevelCalculator { for (BlockState bs : chunk.getTileEntities()) { if (bs instanceof Container) { if (addon.isAdvChestEnabled()) { - AdvancedChest aChest = AdvancedChestsAPI.getChestManager().getAdvancedChest(bs.getLocation()); - if (aChest != null) { + AdvancedChest aChest = AdvancedChestsAPI.getChestManager().getAdvancedChest(bs.getLocation()); + if (aChest != null && aChest.getChestType().getName().equals("NORMAL")) { aChest.getPages().stream().map(ChestPage::getItems).forEach(c -> { - for (ItemStack i : c) { - countItemStack(i); + for (Object i : c) { + countItemStack((ItemStack)i); } }); continue;