Class BukkitTeleportHandler

java.lang.Object
com.winterhavenmc.lodestar.adapters.teleporter.bukkit.BukkitTeleportHandler
All Implemented Interfaces:
TeleportHandler

public final class BukkitTeleportHandler extends Object implements TeleportHandler
Class that manages player teleportation, including warmup and cooldown.
  • Constructor Details

    • BukkitTeleportHandler

      public BukkitTeleportHandler(org.bukkit.plugin.java.JavaPlugin plugin, com.winterhavenmc.library.messagebuilder.MessageBuilder messageBuilder, ConnectionProvider connectionProvider, LodeStarUtility lodeStarUtility)
      Class constructor
  • Method Details

    • initiateTeleport

      public void initiateTeleport(org.bukkit.entity.Player player)
      Start the player teleport
      Specified by:
      initiateTeleport in interface TeleportHandler
      Parameters:
      player - the player being teleported
    • cancelTeleport

      public void cancelTeleport(org.bukkit.entity.Player player)
      Cancel pending teleport for player
      Specified by:
      cancelTeleport in interface TeleportHandler
      Parameters:
      player - the player to cancel teleport
    • isWarmingUp

      public boolean isWarmingUp(org.bukkit.entity.Player player)
      Test if player uuid is in warmup map
      Specified by:
      isWarmingUp in interface TeleportHandler
      Parameters:
      player - the player to test if in warmup map
      Returns:
      true if player is in warmup map, false if not
    • removeWarmingUpPlayer

      public void removeWarmingUpPlayer(org.bukkit.entity.Player player)
      Remove player uuid from warmup map
      Specified by:
      removeWarmingUpPlayer in interface TeleportHandler
      Parameters:
      player - the player to remove from the warmup map
    • startPlayerCooldown

      public void startPlayerCooldown(org.bukkit.entity.Player player)
      Insert player into cooldown map
      Specified by:
      startPlayerCooldown in interface TeleportHandler
      Parameters:
      player - the player being inserted into the cooldown map
    • cancelPlayerCooldown

      public void cancelPlayerCooldown(org.bukkit.entity.Player player)
      Remove player from cooldown map
      Specified by:
      cancelPlayerCooldown in interface TeleportHandler
      Parameters:
      player - the player to be removed from the cooldown map
    • isCoolingDown

      public boolean isCoolingDown(org.bukkit.entity.Player player)
      Test if a player is currently in the cooldown map
      Specified by:
      isCoolingDown in interface TeleportHandler
      Parameters:
      player - the player to check
      Returns:
      true if player is currently in the cooldown map, false if not