We need to use event.getBlock() here

Fix my boo boo from previous commit
This commit is contained in:
TfT_02 2014-03-11 13:28:56 +01:00
parent ebdf11300b
commit 9a359bf42c
2 changed files with 5 additions and 3 deletions

View File

@ -97,7 +97,7 @@ public class BlockListener implements Listener {
Block movedBlock = event.getRetractLocation().getBlock();
// Needed only because under some circumstances Minecraft doesn't move the block
new StickyPistonTrackerTask(event.getDirection(), movedBlock).runTaskLater(plugin, 2);
new StickyPistonTrackerTask(event.getDirection(), event.getBlock(), movedBlock).runTaskLater(plugin, 2);
}
/**

View File

@ -10,10 +10,12 @@ import com.gmail.nossr50.util.BlockUtils;
public class StickyPistonTrackerTask extends BukkitRunnable {
private BlockFace direction;
private Block block;
private Block movedBlock;
public StickyPistonTrackerTask(BlockFace direction, Block movedBlock) {
public StickyPistonTrackerTask(BlockFace direction, Block block, Block movedBlock) {
this.direction = direction;
this.block = block;
this.movedBlock = movedBlock;
}
@ -24,6 +26,6 @@ public class StickyPistonTrackerTask extends BukkitRunnable {
}
mcMMO.getPlaceStore().setFalse(movedBlock);
mcMMO.getPlaceStore().setTrue(movedBlock.getRelative(direction));
mcMMO.getPlaceStore().setTrue(block.getRelative(direction));
}
}