mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-01 22:16:08 +00:00
Make events cancellable again
Signed-off-by: BuildTools <[email protected]>
This commit is contained in:
1 parent
0d8b2dce5b
commit
6ee2b2ce4d
11 files changed
+272
-151
No files matched your search
@@ -9,7 +9,7 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* An event, fired when a player sets a new warp
|
||||
*/
|
||||
public class PlayerSetWarpEvent extends Event {
|
||||
public class PlayerSetWarpEvent extends Event implements Cancellable {
|
||||
|
||||
private final Player player;
|
||||
private final Warp warp;
|
||||
@@ -54,4 +54,14 @@ public class PlayerSetWarpEvent extends Event {
|
||||
public Warp getWarp() {
|
||||
return warp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return isCancelled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCancelled(boolean cancel) {
|
||||
isCancelled = cancel;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user