Package net.godlycow.org.essc.api.rtp
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 Summary
Modifier and TypeMethodDescriptionbooleanChecks if RTP particles are on.voidcancelPendingRtp(org.bukkit.entity.Player player) Cancels the player's pending RTP, if any.getActiveRequest(org.bukkit.entity.Player player) Gets the player's active RTP request, if any.getAvailableWorldNamesFor(org.bukkit.entity.Player player) Gets the worlds the player may RTP in.Gets every configured world.longGets the global RTP cooldown in seconds.intGets the highest Y used in the search.intGets the lowest Y used in the search.longGets the global RTP warmup in seconds.intGets max safe-spot search attempts per request.intgetPlayerCountInWorld(String worldName) Gets how many players are counted in a world.getPlayerState(org.bukkit.entity.Player player) Gets a snapshot of the player's RTP state.longgetRemainingCooldownSeconds(org.bukkit.entity.Player player) Gets remaining RTP cooldown in seconds, 0 if none.getWorldSettings(String worldName) Gets the settings for one world.booleanhasBypassPermission(org.bukkit.entity.Player player, String type) Checks if the player skips an RTP restriction, like cooldown or warmup.booleanhasWorldPermission(org.bukkit.entity.Player player, String worldName) Checks if the player may RTP in a world.booleanChecks if moving cancels a pending warmup.booleanisOnCooldown(org.bukkit.entity.Player player) Checks if the player is on RTP cooldown.booleanisRtpInProgress(org.bukkit.entity.Player player) Checks if the player has an RTP running right now.booleanChecks if RTP is enabled.booleanChecks if RTP respects the vanilla world border.booleanisWorldEnabled(String worldName) Checks if RTP is on for a world.requestRtp(org.bukkit.entity.Player player, org.bukkit.World world) Runs an RTP for the player in the given world.
-
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
Gets the settings for one world.- Parameters:
worldName- the world name- Returns:
- the settings, or null if not configured
-
isWorldEnabled
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
Checks if the player skips an RTP restriction, like cooldown or warmup.- Parameters:
player- the playertype- the bypass type- Returns:
- true if bypassed
-
hasWorldPermission
Checks if the player may RTP in a world.- Parameters:
player- the playerworldName- the world name- Returns:
- true if allowed
-
getPlayerState
Gets a snapshot of the player's RTP state.- Parameters:
player- the player- Returns:
- the player state
-
getActiveRequest
Gets the player's active RTP request, if any.- Parameters:
player- the player- Returns:
- the active request, or null if none
-
requestRtp
Runs an RTP for the player in the given world.- Parameters:
player- the playerworld- 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
Gets the worlds the player may RTP in.- Parameters:
player- the player- Returns:
- usable world names
-
getPlayerCountInWorld
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
-