Class TeleportLogic

java.lang.Object
us.talabrek.ultimateskyblock.player.TeleportLogic
All Implemented Interfaces:
org.bukkit.event.Listener

public class TeleportLogic extends Object implements org.bukkit.event.Listener
Responsible for teleporting (and cancelling teleporting) of players.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    homeTeleport(@NotNull org.bukkit.entity.Player player, boolean force)
    Teleport the given Player to his island home.
    void
    onPlayerMove(org.bukkit.event.player.PlayerMoveEvent e)
     
    void
    safeTeleport(@NotNull org.bukkit.entity.Player player, @NotNull org.bukkit.Location targetLocation, boolean force)
    Teleport the given Player to the given Location, loading the Chunk before teleporting and with the configured teleport delay if applicable.
    void
    spawnTeleport(@NotNull org.bukkit.entity.Player player, boolean force)
    Teleport the given Player to the spawn in the island world, loading the Chunk before teleporting and with the configured teleport delay if applicable.
    void
    warpTeleport(@NotNull org.bukkit.entity.Player player, @Nullable PlayerInfo playerInfo, boolean force)
    Teleport the given Player to the warp location for the given PlayerInfo.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TeleportLogic

      public TeleportLogic(uSkyBlock plugin)
  • Method Details

    • homeTeleport

      public void homeTeleport(@NotNull @NotNull org.bukkit.entity.Player player, boolean force)
      Teleport the given Player to his island home.
      Parameters:
      player - Player to teleport
      force - True to override teleport delay, false otherwise.
    • safeTeleport

      public void safeTeleport(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull org.bukkit.Location targetLocation, boolean force)
      Teleport the given Player to the given Location, loading the Chunk before teleporting and with the configured teleport delay if applicable.
      Parameters:
      player - Player to teleport.
      targetLocation - Location to teleport the player to.
      force - True to override teleport delay, false otherwise.
    • spawnTeleport

      public void spawnTeleport(@NotNull @NotNull org.bukkit.entity.Player player, boolean force)
      Teleport the given Player to the spawn in the island world, loading the Chunk before teleporting and with the configured teleport delay if applicable.
      Parameters:
      player - Player to teleport.
      force - True to override teleport delay, false otherwise.
    • warpTeleport

      public void warpTeleport(@NotNull @NotNull org.bukkit.entity.Player player, @Nullable @Nullable PlayerInfo playerInfo, boolean force)
      Teleport the given Player to the warp location for the given PlayerInfo.
      Parameters:
      player - Player to teleport.
      playerInfo - PlayerInfo to lookup the target warp location.
      force - True to override teleport delay, false otherwise.
    • onPlayerMove

      public void onPlayerMove(org.bukkit.event.player.PlayerMoveEvent e)