mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Make TeleportEvent cancellable
This commit is contained in:
1 parent
e8e9b1ffb9
commit
8d8420541d
2 files changed
+13
-2
No files matched your search
@@ -10,13 +10,15 @@ public class TeleportEvent extends Event implements ITeleportEvent {
|
||||
private static final HandlerList HANDLER_LIST = new HandlerList();
|
||||
|
||||
private final Teleport teleport;
|
||||
private boolean cancelled;
|
||||
|
||||
public TeleportEvent(@NotNull Teleport teleport) {
|
||||
this.teleport = teleport;
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Teleport getTeleport() {
|
||||
@NotNull
|
||||
public Teleport getTeleport() {
|
||||
return teleport;
|
||||
}
|
||||
|
||||
@@ -31,4 +33,13 @@ public class TeleportEvent extends Event implements ITeleportEvent {
|
||||
return HANDLER_LIST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCancelled(boolean cancelled) {
|
||||
this.cancelled = cancelled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return cancelled;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user