Small change for CraftBukkit BlockFlowing fix
This commit is contained in:
parent
cb66f868b4
commit
4b1688f4da
@ -16,7 +16,6 @@ public class BlockFromToEvent extends BlockEvent implements Cancellable {
|
||||
public BlockFromToEvent(final Event.Type type, final Block block, final BlockFace face) {
|
||||
super(type, block);
|
||||
this.face = face;
|
||||
this.to = block.getRelative(face.getModX(), face.getModY(), face.getModZ());
|
||||
this.cancel = false;
|
||||
}
|
||||
|
||||
@ -35,6 +34,9 @@ public class BlockFromToEvent extends BlockEvent implements Cancellable {
|
||||
* @return Block the faced block
|
||||
*/
|
||||
public Block getToBlock() {
|
||||
if (to == null) {
|
||||
to = block.getRelative(face.getModX(), face.getModY(), face.getModZ());
|
||||
}
|
||||
return to;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user