mirror of
https://github.com/DieReicheErethons/Brewery.git
synced 2025-01-09 19:17:35 +01:00
Use better Piston Retract Barrel check
This commit is contained in:
parent
7c3d231b34
commit
0e02355cca
@ -70,10 +70,11 @@ public class BlockListener implements Listener {
|
||||
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
|
||||
public void onPistonRetract(BlockPistonRetractEvent event) {
|
||||
if (event.isSticky()) {
|
||||
Block block = event.getRetractLocation().getBlock();
|
||||
|
||||
for (Block block : event.getBlocks()) {
|
||||
if (Barrel.get(block) != null) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user