mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-05 16:49:39 +00:00
Fixed BlockFromToEvent not knowing source block from destination block.
This commit is contained in:
parent
101fffc82f
commit
a3da4005e4
1 changed files with 4 additions and 4 deletions
|
@ -9,14 +9,14 @@ import org.bukkit.event.Event;
|
|||
* Holds information for events with a source block and a destination block
|
||||
*/
|
||||
public class BlockFromToEvent extends BlockEvent implements Cancellable {
|
||||
protected Block from;
|
||||
protected Block to;
|
||||
protected BlockFace face;
|
||||
protected boolean cancel;
|
||||
|
||||
public BlockFromToEvent(final Event.Type type, final Block block, final BlockFace face) {
|
||||
super(type, block);
|
||||
this.face = face;
|
||||
this.from = block.getRelative(face.getModX(), face.getModY(), face.getModZ());
|
||||
this.to = block.getRelative(face.getModX(), face.getModY(), face.getModZ());
|
||||
this.cancel = false;
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,8 @@ public class BlockFromToEvent extends BlockEvent implements Cancellable {
|
|||
*
|
||||
* @return Block the faced block
|
||||
*/
|
||||
public Block getFromBlock() {
|
||||
return from;
|
||||
public Block getToBlock() {
|
||||
return to;
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
|
|
Loading…
Add table
Reference in a new issue