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

    Constructors
    Constructor
    Description
    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)
    Creates an instance of a StoredBlockView record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the accumulatedMoney record component.
    @NotNull org.bukkit.Location
    Returns the value of the anvilLocation record component.
    @NotNull String
    Returns the value of the arenaId record component.
    @NotNull BlockType
    Returns the value of the blockType record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @NotNull UUID
    Returns the value of the ownerId record component.
    int
    Returns the value of the plotNumber record component.
    @Nullable org.bukkit.Location
    Returns the value of the pressurePlateLocation record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the vault record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a StoredBlockView record class.
      Parameters:
      blockType - the value for the blockType record component
      ownerId - the value for the ownerId record component
      arenaId - the value for the arenaId record component
      plotNumber - the value for the plotNumber record component
      anvilLocation - the value for the anvilLocation record component
      pressurePlateLocation - the value for the pressurePlateLocation record component
      accumulatedMoney - the value for the accumulatedMoney record component
      vault - the value for the vault record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • blockType

      @NotNull public @NotNull BlockType blockType()
      Returns the value of the blockType record component.
      Returns:
      the value of the blockType record component
    • ownerId

      @NotNull public @NotNull UUID ownerId()
      Returns the value of the ownerId record component.
      Returns:
      the value of the ownerId record component
    • arenaId

      @NotNull public @NotNull String arenaId()
      Returns the value of the arenaId record component.
      Returns:
      the value of the arenaId record component
    • plotNumber

      public int plotNumber()
      Returns the value of the plotNumber record component.
      Returns:
      the value of the plotNumber record component
    • anvilLocation

      @NotNull public @NotNull org.bukkit.Location anvilLocation()
      Returns the value of the anvilLocation record component.
      Returns:
      the value of the anvilLocation record component
    • pressurePlateLocation

      @Nullable public @Nullable org.bukkit.Location pressurePlateLocation()
      Returns the value of the pressurePlateLocation record component.
      Returns:
      the value of the pressurePlateLocation record component
    • accumulatedMoney

      public double accumulatedMoney()
      Returns the value of the accumulatedMoney record component.
      Returns:
      the value of the accumulatedMoney record component
    • vault

      public boolean vault()
      Returns the value of the vault record component.
      Returns:
      the value of the vault record component