Fixed duplication bug #2419 (Correct fix)

This commit is contained in:
isokissa3
2015-03-11 14:31:56 +02:00
parent 6c29da94f3
commit f76771f0a8
2 changed files with 21 additions and 10 deletions

View File

@ -1,5 +1,6 @@
package com.gmail.nossr50.runnables;
import org.bukkit.Bukkit;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.scheduler.BukkitRunnable;
@ -20,7 +21,7 @@ public class StickyPistonTrackerTask extends BukkitRunnable {
@Override
public void run() {
if (!mcMMO.getPlaceStore().isTrue(movedBlock)) {
if (!mcMMO.getPlaceStore().isTrue(movedBlock.getRelative(direction))) {
return;
}
@ -30,7 +31,7 @@ public class StickyPistonTrackerTask extends BukkitRunnable {
}
// The sticky piston actually pulled the block so move the PlaceStore data
mcMMO.getPlaceStore().setFalse(movedBlock);
mcMMO.getPlaceStore().setTrue(movedBlock.getRelative(direction));
mcMMO.getPlaceStore().setFalse(movedBlock.getRelative(direction));
mcMMO.getPlaceStore().setTrue(movedBlock);
}
}