Record Class AnvilSlotView
java.lang.Object
java.lang.Record
dev.yowsef.stealablock.api.storage.AnvilSlotView
@AnyThread
public record AnvilSlotView(@NotNull org.bukkit.Location anvilLocation, @Nullable org.bukkit.Location plateLocation, boolean occupied, @Nullable StoredBlockView storedBlock)
extends Record
Immutable view of a paired anvil + pressure plate storage slot inside a plot.
-
Constructor Summary
ConstructorsConstructorDescriptionAnvilSlotView(@NotNull org.bukkit.Location anvilLocation, @Nullable org.bukkit.Location plateLocation, boolean occupied, @Nullable StoredBlockView storedBlock) Creates an instance of aAnvilSlotViewrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull org.bukkit.LocationReturns the value of theanvilLocationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanoccupied()Returns the value of theoccupiedrecord component.@Nullable org.bukkit.LocationReturns the value of theplateLocationrecord component.@Nullable StoredBlockViewReturns the value of thestoredBlockrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AnvilSlotView
public AnvilSlotView(@NotNull @NotNull org.bukkit.Location anvilLocation, @Nullable @Nullable org.bukkit.Location plateLocation, boolean occupied, @Nullable @Nullable StoredBlockView storedBlock) Creates an instance of aAnvilSlotViewrecord class.- Parameters:
anvilLocation- the value for theanvilLocationrecord componentplateLocation- the value for theplateLocationrecord componentoccupied- the value for theoccupiedrecord componentstoredBlock- the value for thestoredBlockrecord 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. -
anvilLocation
@NotNull public @NotNull org.bukkit.Location anvilLocation()Returns the value of theanvilLocationrecord component.- Returns:
- the value of the
anvilLocationrecord component
-
plateLocation
@Nullable public @Nullable org.bukkit.Location plateLocation()Returns the value of theplateLocationrecord component.- Returns:
- the value of the
plateLocationrecord component
-
occupied
public boolean occupied()Returns the value of theoccupiedrecord component.- Returns:
- the value of the
occupiedrecord component
-
storedBlock
Returns the value of thestoredBlockrecord component.- Returns:
- the value of the
storedBlockrecord component
-