Record Class ConveyorBlockView

java.lang.Object
java.lang.Record
dev.yowsef.stealablock.api.conveyor.ConveyorBlockView

@AnyThread public record ConveyorBlockView(@NotNull String arenaId, @NotNull BlockType blockType, @NotNull String state, boolean mysteryBlock, @Nullable UUID claimedOwnerId, int targetPlotNumber, double speedMultiplier, @Nullable org.bukkit.Location currentLocation) extends Record
Immutable snapshot of a block currently moving on a conveyor or being delivered to a plot.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConveyorBlockView(@NotNull String arenaId, @NotNull BlockType blockType, @NotNull String state, boolean mysteryBlock, @Nullable UUID claimedOwnerId, int targetPlotNumber, double speedMultiplier, @Nullable org.bukkit.Location currentLocation)
    Creates an instance of a ConveyorBlockView record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull String
    Returns the value of the arenaId record component.
    @NotNull BlockType
    Returns the value of the blockType record component.
    @Nullable UUID
    Returns the value of the claimedOwnerId record component.
    @Nullable org.bukkit.Location
    Returns the value of the currentLocation record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the mysteryBlock record component.
    double
    Returns the value of the speedMultiplier record component.
    @NotNull String
    Returns the value of the state record component.
    int
    Returns the value of the targetPlotNumber 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

    • ConveyorBlockView

      public ConveyorBlockView(@NotNull @NotNull String arenaId, @NotNull @NotNull BlockType blockType, @NotNull @NotNull String state, boolean mysteryBlock, @Nullable @Nullable UUID claimedOwnerId, int targetPlotNumber, double speedMultiplier, @Nullable @Nullable org.bukkit.Location currentLocation)
      Creates an instance of a ConveyorBlockView record class.
      Parameters:
      arenaId - the value for the arenaId record component
      blockType - the value for the blockType record component
      state - the value for the state record component
      mysteryBlock - the value for the mysteryBlock record component
      claimedOwnerId - the value for the claimedOwnerId record component
      targetPlotNumber - the value for the targetPlotNumber record component
      speedMultiplier - the value for the speedMultiplier record component
      currentLocation - the value for the currentLocation 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
    • blockType

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

      @NotNull public @NotNull String state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • mysteryBlock

      public boolean mysteryBlock()
      Returns the value of the mysteryBlock record component.
      Returns:
      the value of the mysteryBlock record component
    • claimedOwnerId

      @Nullable public @Nullable UUID claimedOwnerId()
      Returns the value of the claimedOwnerId record component.
      Returns:
      the value of the claimedOwnerId record component
    • targetPlotNumber

      public int targetPlotNumber()
      Returns the value of the targetPlotNumber record component.
      Returns:
      the value of the targetPlotNumber record component
    • speedMultiplier

      public double speedMultiplier()
      Returns the value of the speedMultiplier record component.
      Returns:
      the value of the speedMultiplier record component
    • currentLocation

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