Klasse SelectionSession

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

public final class SelectionSession extends Object
Mutable, short-lived pair of selection corners owned by one player.
  • Konstruktordetails

    • SelectionSession

      public SelectionSession()
      Creates an empty selection session.
  • Methodendetails

    • setFirst

      public void setFirst(org.bukkit.Location location)
      Sets the first selection corner.
      Parameter:
      location - new first corner
    • setSecond

      public void setSecond(org.bukkit.Location location)
      Sets the second selection corner.
      Parameter:
      location - new second corner
    • requireSelection

      public Selection requireSelection()
      Produces an immutable selection when both corners are valid.
      Gibt zurück:
      complete selection
      Löst aus:
      IllegalStateException - when a corner is missing or worlds differ
    • isOlderThan

      public boolean isOlderThan(Instant cutoff)
      Checks whether the session has expired.
      Parameter:
      cutoff - oldest accepted update time
      Gibt zurück:
      true when the session predates the cutoff