mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-26 02:57:42 +01:00
Break denied hoppers.
This commit is contained in:
parent
6da8fabb1f
commit
913d5d64ae
@ -46,6 +46,7 @@
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.block.DoubleChest;
|
||||
import org.bukkit.block.Hopper;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.entity.FallingBlock;
|
||||
@ -630,9 +631,13 @@ public void onInventoryMoveItem(InventoryMoveItemEvent event) {
|
||||
|
||||
handleInventoryHolderUse(event, cause, targetHolder);
|
||||
|
||||
if (event.isCancelled() && causeHolder instanceof Hopper) {
|
||||
((Hopper) causeHolder).getBlock().breakNaturally();
|
||||
} else {
|
||||
entry.setCancelled(event.isCancelled());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(ignoreCancelled = true)
|
||||
public void onPotionSplash(PotionSplashEvent event) {
|
||||
|
Loading…
Reference in New Issue
Block a user