mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-19 08:55:26 +01:00
Fixed piston tracking
This commit is contained in:
parent
5377b9b618
commit
d955feef61
@ -37,7 +37,6 @@ import org.bukkit.event.block.BlockPistonExtendEvent;
|
||||
import org.bukkit.event.block.BlockPistonRetractEvent;
|
||||
import org.bukkit.event.block.BlockPlaceEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
|
||||
import org.getspout.spoutapi.sound.SoundEffect;
|
||||
|
||||
@ -59,17 +58,11 @@ public class BlockListener implements Listener {
|
||||
BlockFace direction = event.getDirection();
|
||||
|
||||
for (Block b : blocks) {
|
||||
if (mcMMO.placeStore.isTrue(b)) {
|
||||
b.getRelative(direction).setMetadata("pistonTrack", new FixedMetadataValue(plugin, true));
|
||||
mcMMO.placeStore.setFalse(b);
|
||||
}
|
||||
mcMMO.placeStore.setFalse(b);
|
||||
}
|
||||
|
||||
for (Block b : blocks) {
|
||||
if (b.getRelative(direction).hasMetadata("pistonTrack")) {
|
||||
mcMMO.placeStore.setTrue(b.getRelative(direction));
|
||||
b.getRelative(direction).removeMetadata("pistonTrack", plugin);
|
||||
}
|
||||
mcMMO.placeStore.setTrue(b.getRelative(direction));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user