Interface LobbyAPI
-
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.Location
Gets the center location of the lobby.org.bukkit.Location
Gets the first corner location of the lobby.org.bukkit.Location
Gets the second corner location of the lobby.boolean
isInLobby
(org.bukkit.entity.Player player) Checks if a player is currently inside the lobby.void
setCenter
(org.bukkit.Location location) Sets the center location of the lobby.void
setCorner1
(org.bukkit.Location location) Sets the first corner location of the lobby.void
setCorner2
(org.bukkit.Location location) Sets the second corner location of the lobby.void
teleport
(org.bukkit.entity.Player player, LocationKey key) Teleports a player to one of the lobby locations (center, corner1, or corner2) based on the givenLocationKey
.
-
Method Details
-
getCenter
org.bukkit.Location getCenter()Gets the center location of the lobby.This method retrieves the central location within the lobby area, typically used for spawning players.
- Returns:
- The center
Location
of the lobby.
-
getCorner1
org.bukkit.Location getCorner1()Gets the first corner location of the lobby.This method retrieves one of the corners of the lobby, which can be used for various boundary checks.
- Returns:
- The first corner
Location
of the lobby.
-
getCorner2
org.bukkit.Location getCorner2()Gets the second corner location of the lobby.This method retrieves the second corner of the lobby, which is often paired with the first corner for boundary purposes.
- Returns:
- The second corner
Location
of the lobby.
-
setCenter
void setCenter(org.bukkit.Location location) Sets the center location of the lobby.This method allows the center of the lobby to be set to a specific
Location
.- Parameters:
location
- The new centerLocation
for the lobby.
-
setCorner1
void setCorner1(org.bukkit.Location location) Sets the first corner location of the lobby.This method allows the first corner of the lobby to be set to a specific
Location
.- Parameters:
location
- The new first cornerLocation
for the lobby.
-
setCorner2
void setCorner2(org.bukkit.Location location) Sets the second corner location of the lobby.This method allows the second corner of the lobby to be set to a specific
Location
.- Parameters:
location
- The new second cornerLocation
for the lobby.
-
teleport
Teleports a player to one of the lobby locations (center, corner1, or corner2) based on the givenLocationKey
.This method allows teleporting the player asynchronously to a specific lobby location by passing a key value.
- Parameters:
player
- ThePlayer
to teleport.key
- TheLocationKey
specifying the destination (center, corner1, or corner2).
-
isInLobby
boolean isInLobby(org.bukkit.entity.Player player) Checks if a player is currently inside the lobby.This method determines if the player is within the designated lobby area, based on their current location.
- Parameters:
player
- ThePlayer
to check.- Returns:
true
if the player is inside the lobby area,false
otherwise.
-