mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-05 16:49:39 +00:00
Small change for CraftBukkit BlockFlowing fix
This commit is contained in:
parent
cb66f868b4
commit
4b1688f4da
1 changed files with 4 additions and 2 deletions
|
@ -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,7 +34,10 @@ public class BlockFromToEvent extends BlockEvent implements Cancellable {
|
|||
* @return Block the faced block
|
||||
*/
|
||||
public Block getToBlock() {
|
||||
return to;
|
||||
if (to == null) {
|
||||
to = block.getRelative(face.getModX(), face.getModY(), face.getModZ());
|
||||
}
|
||||
return to;
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
|
|
Loading…
Add table
Reference in a new issue