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

    Constructors
    Constructor
    Description
    LootContainerSnapshot(@NotNull String id, @NotNull LootContainerType type, @NotNull List<org.bukkit.Location> positions, int size, boolean available, boolean processed, boolean playerPlaced)
    Creates an instance of a LootContainerSnapshot record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the available 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 String
    id()
    Returns the value of the id record component.
    boolean
    Returns the value of the playerPlaced record component.
    List<org.bukkit.Location>
    Returns the value of the positions record component.
    boolean
    Returns the value of the processed record component.
    int
    Returns the value of the size record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the type record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a LootContainerSnapshot record class.
      Parameters:
      id - the value for the id record component
      type - the value for the type record component
      positions - the value for the positions record component
      size - the value for the size record component
      available - the value for the available record component
      processed - the value for the processed record component
      playerPlaced - the value for the playerPlaced record component
  • Method Details

    • positions

      public List<org.bukkit.Location> positions()
      Returns the value of the positions record component.
      Returns:
      the value of the positions record component
    • 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 '=='.
      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.
    • id

      @NotNull public @NotNull String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • type

      @NotNull public @NotNull LootContainerType type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • size

      public int size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • available

      public boolean available()
      Returns the value of the available record component.
      Returns:
      the value of the available record component
    • processed

      public boolean processed()
      Returns the value of the processed record component.
      Returns:
      the value of the processed record component
    • playerPlaced

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