-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
src/main/java/me/hsgamer/yatpa/event/TeleportRequestEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package me.hsgamer.yatpa.event; | ||
|
||
import me.hsgamer.yatpa.request.RequestEntry; | ||
import org.bukkit.event.Cancellable; | ||
import org.bukkit.event.Event; | ||
import org.bukkit.event.HandlerList; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class TeleportRequestEvent extends Event implements Cancellable { | ||
private static final HandlerList HANDLERS = new HandlerList(); | ||
private final RequestEntry requestEntry; | ||
private boolean cancelled; | ||
|
||
public TeleportRequestEvent(RequestEntry requestEntry) { | ||
this.requestEntry = requestEntry; | ||
} | ||
|
||
public static @NotNull HandlerList getHandlerList() { | ||
return HANDLERS; | ||
} | ||
|
||
public RequestEntry getRequestEntry() { | ||
return requestEntry; | ||
} | ||
|
||
@Override | ||
public @NotNull HandlerList getHandlers() { | ||
return HANDLERS; | ||
} | ||
|
||
@Override | ||
public boolean isCancelled() { | ||
return cancelled; | ||
} | ||
|
||
@Override | ||
public void setCancelled(boolean cancel) { | ||
this.cancelled = cancel; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
public enum RequestStatus { | ||
SUCCESS, | ||
ALREADY_SENT, | ||
CANCELLED, | ||
} |