Class PlayerTeleportEvent
java.lang.Object
com.welcome234.pluginsystem.events.PlayerTeleportEvent
Called when a player teleports
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn enum used for player teleport causes -
Constructor Summary
ConstructorsConstructorDescriptionPlayerTeleportEvent(String playername, PlayerTeleportEvent.TeleportCause cause, double teleportX, double teleportY, boolean teleportDimension) -
Method Summary
Modifier and TypeMethodDescriptionGets the player who has teleportedGets the cause of this teleportationbooleanGets the dimension the player has teleported todoubleGets the X coordinate the player has teleported todoubleGets the Y coordinate the player has teleported tobooleanGets whether this event is cancelledvoidsetCancelled(boolean cancelled)Sets the cancellation status of this event
-
Constructor Details
-
PlayerTeleportEvent
public PlayerTeleportEvent(String playername, PlayerTeleportEvent.TeleportCause cause, double teleportX, double teleportY, boolean teleportDimension)
-
-
Method Details
-
getPlayer
Gets the player who has teleported- Returns:
- Player instance
-
getTeleportCause
Gets the cause of this teleportation- Returns:
- Teleport cause
-
getTeleportX
public double getTeleportX()Gets the X coordinate the player has teleported to- Returns:
- X-coordinate
-
getTeleportY
public double getTeleportY()Gets the Y coordinate the player has teleported to- Returns:
- Y-coordinate
-
getTeleportDimension
public boolean getTeleportDimension()Gets the dimension the player has teleported to- Returns:
- Dimension (false = Overworld, true = End)
-
isCancelled
public boolean isCancelled()Gets whether this event is cancelled- Returns:
- Whether cancelled
-
setCancelled
public void setCancelled(boolean cancelled)Sets the cancellation status of this event- Parameters:
cancelled- Whether cancelled
-