Interface RtpManager


public interface RtpManager
The RTP system. Get it from EssentialsCAPI.getRtpManager(). Calling requestRtp runs the whole flow: checks, warmup, search and teleport.
  • Method Details

    • isRtpSystemEnabled

      boolean isRtpSystemEnabled()
      Checks if RTP is enabled.
      Returns:
      true if enabled
    • getConfiguredWorlds

      Collection<RtpWorldSettings> getConfiguredWorlds()
      Gets every configured world.
      Returns:
      configured worlds, never null
    • getWorldSettings

      RtpWorldSettings getWorldSettings(String worldName)
      Gets the settings for one world.
      Parameters:
      worldName - the world name
      Returns:
      the settings, or null if not configured
    • isWorldEnabled

      boolean isWorldEnabled(String worldName)
      Checks if RTP is on for a world.
      Parameters:
      worldName - the world name
      Returns:
      true if enabled
    • isRtpInProgress

      boolean isRtpInProgress(org.bukkit.entity.Player player)
      Checks if the player has an RTP running right now.
      Parameters:
      player - the player
      Returns:
      true if in progress
    • isOnCooldown

      boolean isOnCooldown(org.bukkit.entity.Player player)
      Checks if the player is on RTP cooldown.
      Parameters:
      player - the player
      Returns:
      true if on cooldown
    • getRemainingCooldownSeconds

      long getRemainingCooldownSeconds(org.bukkit.entity.Player player)
      Gets remaining RTP cooldown in seconds, 0 if none.
      Parameters:
      player - the player
      Returns:
      remaining seconds
    • hasBypassPermission

      boolean hasBypassPermission(org.bukkit.entity.Player player, String type)
      Checks if the player skips an RTP restriction, like cooldown or warmup.
      Parameters:
      player - the player
      type - the bypass type
      Returns:
      true if bypassed
    • hasWorldPermission

      boolean hasWorldPermission(org.bukkit.entity.Player player, String worldName)
      Checks if the player may RTP in a world.
      Parameters:
      player - the player
      worldName - the world name
      Returns:
      true if allowed
    • getPlayerState

      RtpPlayerState getPlayerState(org.bukkit.entity.Player player)
      Gets a snapshot of the player's RTP state.
      Parameters:
      player - the player
      Returns:
      the player state
    • getActiveRequest

      RtpRequest getActiveRequest(org.bukkit.entity.Player player)
      Gets the player's active RTP request, if any.
      Parameters:
      player - the player
      Returns:
      the active request, or null if none
    • requestRtp

      CompletableFuture<RtpResult> requestRtp(org.bukkit.entity.Player player, org.bukkit.World world)
      Runs an RTP for the player in the given world.
      Parameters:
      player - the player
      world - the world to teleport in
      Returns:
      future with the result
    • cancelPendingRtp

      void cancelPendingRtp(org.bukkit.entity.Player player)
      Cancels the player's pending RTP, if any.
      Parameters:
      player - the player
    • getAvailableWorldNamesFor

      List<String> getAvailableWorldNamesFor(org.bukkit.entity.Player player)
      Gets the worlds the player may RTP in.
      Parameters:
      player - the player
      Returns:
      usable world names
    • getPlayerCountInWorld

      int getPlayerCountInWorld(String worldName)
      Gets how many players are counted in a world.
      Parameters:
      worldName - the world name
      Returns:
      player count
    • isWorldBorderGloballyEnabled

      boolean isWorldBorderGloballyEnabled()
      Checks if RTP respects the vanilla world border.
      Returns:
      true if enforced
    • getGlobalCooldownSeconds

      long getGlobalCooldownSeconds()
      Gets the global RTP cooldown in seconds.
      Returns:
      cooldown seconds
    • getGlobalWarmupSeconds

      long getGlobalWarmupSeconds()
      Gets the global RTP warmup in seconds.
      Returns:
      warmup seconds
    • isCancelOnMovementEnabled

      boolean isCancelOnMovementEnabled()
      Checks if moving cancels a pending warmup.
      Returns:
      true if movement cancels
    • areParticlesEnabled

      boolean areParticlesEnabled()
      Checks if RTP particles are on.
      Returns:
      true if enabled
    • getMaxSearchAttempts

      int getMaxSearchAttempts()
      Gets max safe-spot search attempts per request.
      Returns:
      max attempts
    • getGlobalMinY

      int getGlobalMinY()
      Gets the lowest Y used in the search.
      Returns:
      min Y
    • getGlobalMaxY

      int getGlobalMaxY()
      Gets the highest Y used in the search.
      Returns:
      max Y