Fix PreTeleportEvent order of fire and make TeleportationPoint settable

This commit is contained in:
William committed 2021-11-23 16:05:42 +00:00
1 parent 3c8940c459
commit fc2a2553cf
2 files changed
+62 -49

No files matched your search

@@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
public class PlayerPreTeleportEvent extends PlayerEvent implements Cancellable {
private final TeleportationPoint targetPoint;
private TeleportationPoint targetPoint;
private static final HandlerList HANDLER_LIST = new HandlerList();
private boolean isCancelled;
@@ -43,6 +43,15 @@ public class PlayerPreTeleportEvent extends PlayerEvent implements Cancellable {
return targetPoint;
}
/**
* Set's the Player's teleportation destination {@link TeleportationPoint}
*
* @param targetPoint Where the player will be teleported to as a {@link TeleportationPoint}
*/
public void setTargetPoint(TeleportationPoint targetPoint) {
this.targetPoint = targetPoint;
}
@Override
public boolean isCancelled() {
return isCancelled;