Klasse SelectionService

java.lang.Object
de.delinkedde.areashopreborn.selection.SelectionService

public final class SelectionService extends Object
Owns temporary player selections and removes expired sessions.
  • Konstruktordetails

    • SelectionService

      public SelectionService(Duration timeout)
      Creates a selection service.
      Parameter:
      timeout - inactivity duration after which a selection expires
    • SelectionService

      public SelectionService(Duration timeout, int maximumSessions)
      Creates a bounded selection service.
      Parameter:
      timeout - inactivity duration after which a selection expires
      maximumSessions - maximum retained player sessions
  • Methodendetails

    • setFirst

      public void setFirst(UUID playerId, org.bukkit.Location location)
      Sets a player's first selection corner.
      Parameter:
      playerId - player identifier
      location - first corner
    • setSecond

      public void setSecond(UUID playerId, org.bukkit.Location location)
      Sets a player's second selection corner.
      Parameter:
      playerId - player identifier
      location - second corner
    • requireSelection

      public Selection requireSelection(UUID playerId)
      Retrieves a complete, non-expired selection.
      Parameter:
      playerId - player identifier
      Gibt zurück:
      complete selection
      Löst aus:
      IllegalStateException - when missing, incomplete, or expired
    • clear

      public void clear(UUID playerId)
      Discards a player's selection.
      Parameter:
      playerId - player whose selection should be discarded