Interface LobbyAPI
-
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.LocationGets the center location of the lobby.org.bukkit.LocationGets the first corner location of the lobby.org.bukkit.LocationGets the second corner location of the lobby.booleanisInLobby(org.bukkit.entity.Player player) Checks if a player is currently inside the lobby.voidsetCenter(org.bukkit.Location location) Sets the center location of the lobby.voidsetCorner1(org.bukkit.Location location) Sets the first corner location of the lobby.voidsetCorner2(org.bukkit.Location location) Sets the second corner location of the lobby.voidteleport(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
Locationof 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
Locationof 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
Locationof 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 centerLocationfor 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 cornerLocationfor 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 cornerLocationfor 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- ThePlayerto teleport.key- TheLocationKeyspecifying 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- ThePlayerto check.- Returns:
trueif the player is inside the lobby area,falseotherwise.
-