improve compatibility with ValhallaMMO

fuck this plugin holy fuck
This commit is contained in:
hyperdefined
2026-01-20 20:14:18 -05:00
parent 6a994e4a82
commit e537286785
5 changed files with 242 additions and 134 deletions

View File

@@ -18,9 +18,7 @@
package lol.hyper.toolstats.events;
import lol.hyper.toolstats.ToolStats;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.data.Ageable;
import org.bukkit.entity.Player;
@@ -55,11 +53,6 @@ public class BlockBreak implements Listener {
ItemStack heldItem = inventory.getItemInMainHand();
Block block = event.getBlock();
if (block.getType() == Material.CHEST) {
toolStats.playerInteract.openedChests.put(block, player);
Bukkit.getGlobalRegionScheduler().runDelayed(toolStats, scheduledTask -> toolStats.playerInteract.openedChests.remove(block), 20);
}
// only check certain items
if (!toolStats.itemChecker.isMineTool(heldItem.getType())) {
return;