Klasse SelectionSession
java.lang.Object
de.delinkedde.areashopreborn.selection.SelectionSession
Mutable, short-lived pair of selection corners owned by one player.
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleanisOlderThan(Instant cutoff) Checks whether the session has expired.Produces an immutable selection when both corners are valid.voidsetFirst(org.bukkit.Location location) Sets the first selection corner.voidsetSecond(org.bukkit.Location location) Sets the second selection corner.
-
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
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
Checks whether the session has expired.- Parameter:
cutoff- oldest accepted update time- Gibt zurück:
truewhen the session predates the cutoff
-