Skip to content

Commit

Permalink
Revert Team Chests 'Fix' (this is for regular chests only)
Browse files Browse the repository at this point in the history
  • Loading branch information
MetallicGoat committed Sep 25, 2024
1 parent ed1bd06 commit 8ed53f3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
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;
Expand All @@ -17,7 +18,11 @@ public class LockTeamChest implements Listener {
// Many people will want team chests disabled, use this with only regular chests
@EventHandler
public void playerOpenArenaChest(PlayerOpenArenaChestEvent event) {
if (!MainConfig.lock_team_chest_enabled || !event.isTeamChest())

// THIS IS NOT FOR MBEDWARS TEAM CHESTS
final boolean isStandardChest = !event.isTeamChest() && event.getChestBlock().getType() == Material.CHEST;

if (!MainConfig.lock_team_chest_enabled || !isStandardChest)
return;

final Arena arena = event.getArena();
Expand Down

0 comments on commit 8ed53f3

Please sign in to comment.