Record Class StoredBlockView
java.lang.Object
java.lang.Record
dev.yowsef.stealablock.api.storage.StoredBlockView
@AnyThread
public record StoredBlockView(@NotNull BlockType blockType, @NotNull UUID ownerId, @NotNull String arenaId, int plotNumber, @NotNull org.bukkit.Location anvilLocation, @Nullable org.bukkit.Location pressurePlateLocation, double accumulatedMoney, boolean vault)
extends Record
Immutable snapshot of a block stored on a player's plot anvil.
-
Constructor Summary
ConstructorsConstructorDescriptionStoredBlockView(@NotNull BlockType blockType, @NotNull UUID ownerId, @NotNull String arenaId, int plotNumber, @NotNull org.bukkit.Location anvilLocation, @Nullable org.bukkit.Location pressurePlateLocation, double accumulatedMoney, boolean vault) Creates an instance of aStoredBlockViewrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theaccumulatedMoneyrecord component.@NotNull org.bukkit.LocationReturns the value of theanvilLocationrecord component.@NotNull StringarenaId()Returns the value of thearenaIdrecord component.@NotNull BlockTypeReturns the value of theblockTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull UUIDownerId()Returns the value of theownerIdrecord component.intReturns the value of theplotNumberrecord component.@Nullable org.bukkit.LocationReturns the value of thepressurePlateLocationrecord component.final StringtoString()Returns a string representation of this record class.booleanvault()Returns the value of thevaultrecord component.
-
Constructor Details
-
StoredBlockView
public StoredBlockView(@NotNull @NotNull BlockType blockType, @NotNull @NotNull UUID ownerId, @NotNull @NotNull String arenaId, int plotNumber, @NotNull @NotNull org.bukkit.Location anvilLocation, @Nullable @Nullable org.bukkit.Location pressurePlateLocation, double accumulatedMoney, boolean vault) Creates an instance of aStoredBlockViewrecord class.- Parameters:
blockType- the value for theblockTyperecord componentownerId- the value for theownerIdrecord componentarenaId- the value for thearenaIdrecord componentplotNumber- the value for theplotNumberrecord componentanvilLocation- the value for theanvilLocationrecord componentpressurePlateLocation- the value for thepressurePlateLocationrecord componentaccumulatedMoney- the value for theaccumulatedMoneyrecord componentvault- the value for thevaultrecord 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. -
blockType
Returns the value of theblockTyperecord component.- Returns:
- the value of the
blockTyperecord component
-
ownerId
Returns the value of theownerIdrecord component.- Returns:
- the value of the
ownerIdrecord component
-
arenaId
Returns the value of thearenaIdrecord component.- Returns:
- the value of the
arenaIdrecord component
-
plotNumber
public int plotNumber()Returns the value of theplotNumberrecord component.- Returns:
- the value of the
plotNumberrecord component
-
anvilLocation
@NotNull public @NotNull org.bukkit.Location anvilLocation()Returns the value of theanvilLocationrecord component.- Returns:
- the value of the
anvilLocationrecord component
-
pressurePlateLocation
@Nullable public @Nullable org.bukkit.Location pressurePlateLocation()Returns the value of thepressurePlateLocationrecord component.- Returns:
- the value of the
pressurePlateLocationrecord component
-
accumulatedMoney
public double accumulatedMoney()Returns the value of theaccumulatedMoneyrecord component.- Returns:
- the value of the
accumulatedMoneyrecord component
-
vault
public boolean vault()Returns the value of thevaultrecord component.- Returns:
- the value of the
vaultrecord component
-