Record Class PlotView
java.lang.Object
java.lang.Record
dev.yowsef.stealablock.api.plot.PlotView
@AnyThread
public record PlotView(@NotNull String arenaId, int number, boolean occupied, @Nullable UUID ownerId, @Nullable org.bukkit.Location spawn, @Nullable org.bukkit.Location pos1, @Nullable org.bukkit.Location pos2, @NotNull List<AnvilSlotView> storageSlots, int rotation)
extends Record
Immutable snapshot of a plot within an arena.
-
Constructor Summary
ConstructorsConstructorDescriptionPlotView(@NotNull String arenaId, int number, boolean occupied, @Nullable UUID ownerId, @Nullable org.bukkit.Location spawn, @Nullable org.bukkit.Location pos1, @Nullable org.bukkit.Location pos2, @NotNull List<AnvilSlotView> storageSlots, int rotation) Creates an instance of aPlotViewrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull StringarenaId()Returns the value of thearenaIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intnumber()Returns the value of thenumberrecord component.booleanoccupied()Returns the value of theoccupiedrecord component.@Nullable UUIDownerId()Returns the value of theownerIdrecord component.@Nullable org.bukkit.Locationpos1()Returns the value of thepos1record component.@Nullable org.bukkit.Locationpos2()Returns the value of thepos2record component.introtation()Returns the value of therotationrecord component.@Nullable org.bukkit.Locationspawn()Returns the value of thespawnrecord component.@NotNull List<AnvilSlotView> Returns the value of thestorageSlotsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlotView
public PlotView(@NotNull @NotNull String arenaId, int number, boolean occupied, @Nullable @Nullable UUID ownerId, @Nullable @Nullable org.bukkit.Location spawn, @Nullable @Nullable org.bukkit.Location pos1, @Nullable @Nullable org.bukkit.Location pos2, @NotNull @NotNull List<AnvilSlotView> storageSlots, int rotation) Creates an instance of aPlotViewrecord class.- Parameters:
arenaId- the value for thearenaIdrecord componentnumber- the value for thenumberrecord componentoccupied- the value for theoccupiedrecord componentownerId- the value for theownerIdrecord componentspawn- the value for thespawnrecord componentpos1- the value for thepos1record componentpos2- the value for thepos2record componentstorageSlots- the value for thestorageSlotsrecord componentrotation- the value for therotationrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
arenaId
Returns the value of thearenaIdrecord component.- Returns:
- the value of the
arenaIdrecord component
-
number
public int number()Returns the value of thenumberrecord component.- Returns:
- the value of the
numberrecord component
-
occupied
public boolean occupied()Returns the value of theoccupiedrecord component.- Returns:
- the value of the
occupiedrecord component
-
ownerId
Returns the value of theownerIdrecord component.- Returns:
- the value of the
ownerIdrecord component
-
spawn
@Nullable public @Nullable org.bukkit.Location spawn()Returns the value of thespawnrecord component.- Returns:
- the value of the
spawnrecord component
-
pos1
@Nullable public @Nullable org.bukkit.Location pos1()Returns the value of thepos1record component.- Returns:
- the value of the
pos1record component
-
pos2
@Nullable public @Nullable org.bukkit.Location pos2()Returns the value of thepos2record component.- Returns:
- the value of the
pos2record component
-
storageSlots
Returns the value of thestorageSlotsrecord component.- Returns:
- the value of the
storageSlotsrecord component
-
rotation
public int rotation()Returns the value of therotationrecord component.- Returns:
- the value of the
rotationrecord component
-