mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-30 04:01:55 +01:00
Actually put the correct functionality in isCancelled and setCancelled
By: durron597 <martin.jared@gmail.com>
This commit is contained in:
parent
1ec5689002
commit
1c88da4e93
@ -11,11 +11,13 @@ import org.bukkit.event.Event;
|
|||||||
public class BlockFromToEvent extends BlockEvent implements Cancellable {
|
public class BlockFromToEvent extends BlockEvent implements Cancellable {
|
||||||
protected Block from;
|
protected Block from;
|
||||||
protected BlockFace face;
|
protected BlockFace face;
|
||||||
|
protected boolean cancel;
|
||||||
|
|
||||||
public BlockFromToEvent(final Event.Type type, final Block block, final BlockFace face) {
|
public BlockFromToEvent(final Event.Type type, final Block block, final BlockFace face) {
|
||||||
super(type, block);
|
super(type, block);
|
||||||
this.face = face;
|
this.face = face;
|
||||||
this.from = block.getRelative(face.getModX(), face.getModY(), face.getModZ());
|
this.from = block.getRelative(face.getModX(), face.getModY(), face.getModZ());
|
||||||
|
this.cancel = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -38,13 +40,11 @@ public class BlockFromToEvent extends BlockEvent implements Cancellable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCancelled() {
|
public boolean isCancelled() {
|
||||||
// TODO Auto-generated method stub
|
return cancel;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setCancelled(boolean cancel) {
|
public void setCancelled(boolean cancel) {
|
||||||
// TODO Auto-generated method stub
|
this.cancel = cancel;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user