diff options
author | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-01-19 23:28:15 +0000 |
---|---|---|
committer | Thinkofdeath <thinkofdeath@spigotmc.org> | 2015-01-19 23:28:15 +0000 |
commit | cd94e3c9b03d7c2adc0a0112dbf03d27e612ead1 (patch) | |
tree | a59e7f428dc8ca4c73cd91b64e74ca33efe7232d | |
parent | 685a7d4b66147864e52a2687a5d2a2bf14d8a491 (diff) | |
download | bukkit-cd94e3c9b03d7c2adc0a0112dbf03d27e612ead1.tar bukkit-cd94e3c9b03d7c2adc0a0112dbf03d27e612ead1.tar.gz bukkit-cd94e3c9b03d7c2adc0a0112dbf03d27e612ead1.tar.lz bukkit-cd94e3c9b03d7c2adc0a0112dbf03d27e612ead1.tar.xz bukkit-cd94e3c9b03d7c2adc0a0112dbf03d27e612ead1.zip |
Give BlockPistonRetractEvent a list of pulled blocks for sticky pistons
-rw-r--r-- | src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java b/src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java index 0190c4c4..da875f7a 100644 --- a/src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java @@ -1,5 +1,6 @@ package org.bukkit.event.block; +import java.util.List; import org.bukkit.Location; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; @@ -10,7 +11,9 @@ import org.bukkit.event.HandlerList; */ public class BlockPistonRetractEvent extends BlockPistonEvent { private static final HandlerList handlers = new HandlerList(); - public BlockPistonRetractEvent(final Block block, final BlockFace direction) { + private List<Block> blocks; + + public BlockPistonRetractEvent(final Block block, final List<Block> blocks, final BlockFace direction) { super(block, direction); } @@ -20,9 +23,20 @@ public class BlockPistonRetractEvent extends BlockPistonEvent { * * @return The possible location of the possibly moving block. */ + @Deprecated public Location getRetractLocation() { return getBlock().getRelative(getDirection(), 2).getLocation(); } + + /** + * Get an immutable list of the blocks which will be moved by the + * extending. + * + * @return Immutable list of the moved blocks. + */ + public List<Block> getBlocks() { + return blocks; + } @Override public HandlerList getHandlers() { |