Record Class AutoQuery

java.lang.Object
java.lang.Record
com.plotsquared.core.services.plots.AutoQuery
Record Components:
player - Player to claim for
startId - Plot ID to start searching from
sizeX - Number of plots along the X axis
sizeZ - Number of plots along the Z axis
plotArea - Plot area to search in

public record AutoQuery(@NonNull PlotPlayer<?> player, @Nullable PlotId startId, int sizeX, int sizeZ, @NonNull PlotArea plotArea) extends Record
Crate a new auto query
  • Constructor Details

    • AutoQuery

      public AutoQuery(@NonNull PlotPlayer<?> player, @Nullable PlotId startId, int sizeX, int sizeZ, @NonNull PlotArea plotArea)
      Creates an instance of a AutoQuery record class.
      Parameters:
      player - the value for the player record component
      startId - the value for the startId record component
      sizeX - the value for the sizeX record component
      sizeZ - the value for the sizeZ record component
      plotArea - the value for the plotArea record component
  • Method Details

    • player

      public @NonNull PlotPlayer<?> player()
      Get the player that the plots are meant for
      Returns:
      Player
    • startId

      Get the plot ID to start searching from
      Returns:
      Start ID
    • sizeX

      public int sizeX()
      Get the number of plots along the X axis
      Returns:
      Number of plots along the X axis
    • sizeZ

      public int sizeZ()
      Get the number of plots along the Z axis
      Returns:
      Number of plots along the Z axis
    • plotArea

      Get the plot area to search in
      Returns:
      Plot area
    • 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.