diff --git a/src/main/java/me/metallicgoat/tweaksaddon/tweaks/misc/LockTeamChest.java b/src/main/java/me/metallicgoat/tweaksaddon/tweaks/misc/LockTeamChest.java index a6e324d..bb8f35e 100644 --- a/src/main/java/me/metallicgoat/tweaksaddon/tweaks/misc/LockTeamChest.java +++ b/src/main/java/me/metallicgoat/tweaksaddon/tweaks/misc/LockTeamChest.java @@ -7,7 +7,6 @@ import de.marcely.bedwars.tools.location.XYZYP; import me.metallicgoat.tweaksaddon.config.MainConfig; import org.bukkit.Location; -import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -18,9 +17,7 @@ public class LockTeamChest implements Listener { // Many people will want team chests disabled, use this with only regular chests @EventHandler public void playerOpenArenaChest(PlayerOpenArenaChestEvent event) { - final Block teamChestBlock = event.getChestBlock(); - - if (!MainConfig.lock_team_chest_enabled || teamChestBlock.getType() == Material.ENDER_CHEST) + if (!MainConfig.lock_team_chest_enabled || !event.isTeamChest()) return; final Arena arena = event.getArena();