fix #74
This commit is contained in:
1 parent
e3256c8a21
commit
9d1e0bacdb
1 file changed
+3
@@ -3,6 +3,7 @@ package org.purpurmc.purpurextras.modules;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.block.DecoratedPot;
|
||||
import org.bukkit.block.Vault;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
@@ -62,6 +63,8 @@ public class LootBlocksProtectionModule implements PurpurExtrasModule, Listener
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
||||
public void onDestroyBlockWithLoot(BlockBreakEvent event) {
|
||||
// decorated pots are only lootable by breaking them
|
||||
if (event.getBlock().getState() instanceof DecoratedPot) return;
|
||||
if (event.getBlock().getState() instanceof Lootable lootable) {
|
||||
if (!lootable.hasLootTable()) return;
|
||||
handleLootBlockDestruction(event);
|
||||
|
||||
Reference in new issue
Block a user