Package dev.piglin.piglinworldapi.util
Class TeleportUtils
java.lang.Object
dev.piglin.piglinworldapi.util.TeleportUtils
- All Implemented Interfaces:
org.bukkit.event.Listener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA timed teleport description -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonMove(org.bukkit.event.player.PlayerMoveEvent event)static booleanteleportDelayed(TeleportUtils.TimedTeleportRecord<?> record, boolean checkPVP)Wait untilTeleportUtils.TimedTeleportRecord.timeand teleport the player toTeleportUtils.TimedTeleportRecord.destinationif the player doesn't move
-
Constructor Details
-
TeleportUtils
public TeleportUtils()
-
-
Method Details
-
teleportDelayed
public static boolean teleportDelayed(TeleportUtils.TimedTeleportRecord<?> record, boolean checkPVP)Wait untilTeleportUtils.TimedTeleportRecord.timeand teleport the player toTeleportUtils.TimedTeleportRecord.destinationif the player doesn't move- Parameters:
record- The teleport description- Returns:
- true if teleport was scheduled, false if it wasn't scheduled due to PVP
-
onMove
public void onMove(org.bukkit.event.player.PlayerMoveEvent event)
-