Package dev.itsharshxd.zentrix.api.loot
Record Class LootContainerSnapshot
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.loot.LootContainerSnapshot
public record LootContainerSnapshot(@NotNull String id, @NotNull LootContainerType type, @NotNull List<org.bukkit.Location> positions, int size, boolean available, boolean processed, boolean playerPlaced)
extends Record
Read-only description of one logical block container (including both halves of a chest).
-
Constructor Summary
ConstructorsConstructorDescriptionLootContainerSnapshot(@NotNull String id, @NotNull LootContainerType type, @NotNull List<org.bukkit.Location> positions, int size, boolean available, boolean processed, boolean playerPlaced) Creates an instance of aLootContainerSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theavailablerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringid()Returns the value of theidrecord component.booleanReturns the value of theplayerPlacedrecord component.List<org.bukkit.Location> Returns the value of thepositionsrecord component.booleanReturns the value of theprocessedrecord component.intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.@NotNull LootContainerTypetype()Returns the value of thetyperecord component.
-
Constructor Details
-
LootContainerSnapshot
public LootContainerSnapshot(@NotNull @NotNull String id, @NotNull @NotNull LootContainerType type, @NotNull @NotNull List<org.bukkit.Location> positions, int size, boolean available, boolean processed, boolean playerPlaced) Creates an instance of aLootContainerSnapshotrecord class.- Parameters:
id- the value for theidrecord componenttype- the value for thetyperecord componentpositions- the value for thepositionsrecord componentsize- the value for thesizerecord componentavailable- the value for theavailablerecord componentprocessed- the value for theprocessedrecord componentplayerPlaced- the value for theplayerPlacedrecord component
-
-
Method Details
-
positions
Returns the value of thepositionsrecord component.- Returns:
- the value of the
positionsrecord component
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
available
public boolean available()Returns the value of theavailablerecord component.- Returns:
- the value of the
availablerecord component
-
processed
public boolean processed()Returns the value of theprocessedrecord component.- Returns:
- the value of the
processedrecord component
-
playerPlaced
public boolean playerPlaced()Returns the value of theplayerPlacedrecord component.- Returns:
- the value of the
playerPlacedrecord component
-