mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-29 16:46:46 +01:00
parent
875db44afd
commit
6876f192de
@ -15,11 +15,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.event.block.BlockDamageEvent;
|
||||
import org.bukkit.event.block.BlockPistonExtendEvent;
|
||||
import org.bukkit.event.block.BlockPistonRetractEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.event.block.*;
|
||||
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
@ -154,6 +150,18 @@ public class BlockListener implements Listener {
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void onBlockGrow(BlockGrowEvent event)
|
||||
{
|
||||
BlockState blockState = event.getBlock().getState();
|
||||
|
||||
if (!BlockUtils.shouldBeWatched(blockState)) {
|
||||
return;
|
||||
}
|
||||
|
||||
mcMMO.getPlaceStore().setFalse(blockState);
|
||||
}
|
||||
|
||||
/**
|
||||
* Monitor BlockBreak events.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user