mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-02 05:02:10 -07:00
Actually put the correct functionality in isCancelled and setCancelled
By: durron597 <martin.jared@gmail.com>
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user