mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
Fixed dupe exploit with pistons (again).
This commit is contained in:
parent
35d4914518
commit
23d916f191
@ -10,6 +10,7 @@ Key:
|
|||||||
Version 1.3.09
|
Version 1.3.09
|
||||||
= Fixed issue with NoCheatPlus and Serrated Strikes / Skull Splitter (fight.noswing)
|
= Fixed issue with NoCheatPlus and Serrated Strikes / Skull Splitter (fight.noswing)
|
||||||
= Fixed bug where you could receive Archery XP from Potions
|
= Fixed bug where you could receive Archery XP from Potions
|
||||||
|
= Fixed bug with duping blocks via piston pushing
|
||||||
! Changed Spout settings to be in their own config file (spout.yml)
|
! Changed Spout settings to be in their own config file (spout.yml)
|
||||||
|
|
||||||
Version 1.3.08
|
Version 1.3.08
|
||||||
|
@ -36,6 +36,7 @@ import org.bukkit.event.block.BlockPistonExtendEvent;
|
|||||||
import org.bukkit.event.block.BlockPistonRetractEvent;
|
import org.bukkit.event.block.BlockPistonRetractEvent;
|
||||||
import org.bukkit.event.block.BlockPlaceEvent;
|
import org.bukkit.event.block.BlockPlaceEvent;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
import org.bukkit.metadata.FixedMetadataValue;
|
||||||
|
|
||||||
import org.getspout.spoutapi.sound.SoundEffect;
|
import org.getspout.spoutapi.sound.SoundEffect;
|
||||||
|
|
||||||
@ -58,15 +59,15 @@ public class BlockListener implements Listener {
|
|||||||
|
|
||||||
for (Block b : blocks) {
|
for (Block b : blocks) {
|
||||||
if (mcMMO.placeStore.isTrue(b)) {
|
if (mcMMO.placeStore.isTrue(b)) {
|
||||||
mcMMO.placeStore.setTrue(b.getRelative(direction));
|
b.getRelative(direction).setMetadata("pistonTrack", new FixedMetadataValue(plugin, true));
|
||||||
mcMMO.placeStore.setFalse(b);
|
mcMMO.placeStore.setFalse(b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Block b : blocks) {
|
for (Block b : blocks) {
|
||||||
if (mcMMO.placeStore.isTrue(b.getRelative(direction))) {
|
if (b.getRelative(direction).hasMetadata("pistonTrack")) {
|
||||||
mcMMO.placeStore.setTrue(b.getRelative(direction));
|
mcMMO.placeStore.setTrue(b.getRelative(direction));
|
||||||
mcMMO.placeStore.setFalse(b);
|
b.getRelative(direction).removeMetadata("pistonTrack", plugin);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user