Record Class PlotView

java.lang.Object
java.lang.Record
dev.yowsef.stealablock.api.plot.PlotView

@AnyThread public record PlotView(@NotNull String arenaId, int number, boolean occupied, @Nullable UUID ownerId, @Nullable org.bukkit.Location spawn, @Nullable org.bukkit.Location pos1, @Nullable org.bukkit.Location pos2, @NotNull List<AnvilSlotView> storageSlots, int rotation) extends Record
Immutable snapshot of a plot within an arena.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlotView(@NotNull String arenaId, int number, boolean occupied, @Nullable UUID ownerId, @Nullable org.bukkit.Location spawn, @Nullable org.bukkit.Location pos1, @Nullable org.bukkit.Location pos2, @NotNull List<AnvilSlotView> storageSlots, int rotation)
    Creates an instance of a PlotView record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull String
    Returns the value of the arenaId record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the number record component.
    boolean
    Returns the value of the occupied record component.
    @Nullable UUID
    Returns the value of the ownerId record component.
    @Nullable org.bukkit.Location
    Returns the value of the pos1 record component.
    @Nullable org.bukkit.Location
    Returns the value of the pos2 record component.
    int
    Returns the value of the rotation record component.
    @Nullable org.bukkit.Location
    Returns the value of the spawn record component.
    Returns the value of the storageSlots record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PlotView

      public PlotView(@NotNull @NotNull String arenaId, int number, boolean occupied, @Nullable @Nullable UUID ownerId, @Nullable @Nullable org.bukkit.Location spawn, @Nullable @Nullable org.bukkit.Location pos1, @Nullable @Nullable org.bukkit.Location pos2, @NotNull @NotNull List<AnvilSlotView> storageSlots, int rotation)
      Creates an instance of a PlotView record class.
      Parameters:
      arenaId - the value for the arenaId record component
      number - the value for the number record component
      occupied - the value for the occupied record component
      ownerId - the value for the ownerId record component
      spawn - the value for the spawn record component
      pos1 - the value for the pos1 record component
      pos2 - the value for the pos2 record component
      storageSlots - the value for the storageSlots record component
      rotation - the value for the rotation 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.
    • arenaId

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

      public int number()
      Returns the value of the number record component.
      Returns:
      the value of the number record component
    • occupied

      public boolean occupied()
      Returns the value of the occupied record component.
      Returns:
      the value of the occupied record component
    • ownerId

      @Nullable public @Nullable UUID ownerId()
      Returns the value of the ownerId record component.
      Returns:
      the value of the ownerId record component
    • spawn

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

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

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

      @NotNull public @NotNull List<AnvilSlotView> storageSlots()
      Returns the value of the storageSlots record component.
      Returns:
      the value of the storageSlots record component
    • rotation

      public int rotation()
      Returns the value of the rotation record component.
      Returns:
      the value of the rotation record component