Fixed log stripping giving no exp (woodcutting professions)

This commit is contained in:
Jules 2024-07-26 15:47:35 -07:00
parent 61efa519c2
commit 25ca6e32a4

View File

@ -157,6 +157,11 @@ public class BlockListener implements Listener {
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void registerPlayerPlacedBlocksTag(BlockPlaceEvent event) {
// Ignore log stripping
if (event.getBlock().getType().name().startsWith("STRIPPED_") && event.getItemInHand().getType().name().endsWith("_AXE"))
return;
event.getBlock().setMetadata("player_placed", new FixedMetadataValue(MMOCore.plugin, true));
}