mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Fix PreTeleportEvent order of fire and make TeleportationPoint settable
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user