mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
parent
875db44afd
commit
6876f192de
@ -15,11 +15,7 @@ import org.bukkit.entity.Player;
|
|||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.block.BlockBreakEvent;
|
import org.bukkit.event.block.*;
|
||||||
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.entity.EntityChangeBlockEvent;
|
import org.bukkit.event.entity.EntityChangeBlockEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
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.
|
* Monitor BlockBreak events.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user