Record Class PlayerProfile

java.lang.Object
java.lang.Record
dev.yowsef.stealablock.api.player.PlayerProfile

@AnyThread public record PlayerProfile(@NotNull UUID uuid, @Nullable String name, double balance, int credits, int rebirthLevel, int prestigeLevel, int totalStolen, @Nullable PlotView plot, @NotNull List<StoredBlockView> storedBlocks, @NotNull Set<String> ownedGearIds, @NotNull Set<String> discoveredBlockIds, boolean bedrockPlayer) extends Record
Immutable, thread-safe snapshot of a player's full StealABlock profile.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PlayerProfile(@NotNull UUID uuid, @Nullable String name, double balance, int credits, int rebirthLevel, int prestigeLevel, int totalStolen, @Nullable PlotView plot, @NotNull List<StoredBlockView> storedBlocks, @NotNull Set<String> ownedGearIds, @NotNull Set<String> discoveredBlockIds, boolean bedrockPlayer)
    Creates an instance of a PlayerProfile record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the balance record component.
    boolean
    Returns the value of the bedrockPlayer record component.
    int
    Returns the value of the credits record component.
    @NotNull Set<String>
    Returns the value of the discoveredBlockIds record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @Nullable String
    Returns the value of the name record component.
    @NotNull Set<String>
    Returns the value of the ownedGearIds record component.
    @Nullable PlotView
    Returns the value of the plot record component.
    int
    Returns the value of the prestigeLevel record component.
    int
    Returns the value of the rebirthLevel record component.
    Returns the value of the storedBlocks record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the totalStolen record component.
    @NotNull UUID
    Returns the value of the uuid record component.

    Methods inherited from class Object

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

    • PlayerProfile

      public PlayerProfile(@NotNull @NotNull UUID uuid, @Nullable @Nullable String name, double balance, int credits, int rebirthLevel, int prestigeLevel, int totalStolen, @Nullable @Nullable PlotView plot, @NotNull @NotNull List<StoredBlockView> storedBlocks, @NotNull @NotNull Set<String> ownedGearIds, @NotNull @NotNull Set<String> discoveredBlockIds, boolean bedrockPlayer)
      Creates an instance of a PlayerProfile record class.
      Parameters:
      uuid - the value for the uuid record component
      name - the value for the name record component
      balance - the value for the balance record component
      credits - the value for the credits record component
      rebirthLevel - the value for the rebirthLevel record component
      prestigeLevel - the value for the prestigeLevel record component
      totalStolen - the value for the totalStolen record component
      plot - the value for the plot record component
      storedBlocks - the value for the storedBlocks record component
      ownedGearIds - the value for the ownedGearIds record component
      discoveredBlockIds - the value for the discoveredBlockIds record component
      bedrockPlayer - the value for the bedrockPlayer 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.
    • uuid

      @NotNull public @NotNull UUID uuid()
      Returns the value of the uuid record component.
      Returns:
      the value of the uuid record component
    • name

      @Nullable public @Nullable String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • balance

      public double balance()
      Returns the value of the balance record component.
      Returns:
      the value of the balance record component
    • credits

      public int credits()
      Returns the value of the credits record component.
      Returns:
      the value of the credits record component
    • rebirthLevel

      public int rebirthLevel()
      Returns the value of the rebirthLevel record component.
      Returns:
      the value of the rebirthLevel record component
    • prestigeLevel

      public int prestigeLevel()
      Returns the value of the prestigeLevel record component.
      Returns:
      the value of the prestigeLevel record component
    • totalStolen

      public int totalStolen()
      Returns the value of the totalStolen record component.
      Returns:
      the value of the totalStolen record component
    • plot

      @Nullable public @Nullable PlotView plot()
      Returns the value of the plot record component.
      Returns:
      the value of the plot record component
    • storedBlocks

      @NotNull public @NotNull List<StoredBlockView> storedBlocks()
      Returns the value of the storedBlocks record component.
      Returns:
      the value of the storedBlocks record component
    • ownedGearIds

      @NotNull public @NotNull Set<String> ownedGearIds()
      Returns the value of the ownedGearIds record component.
      Returns:
      the value of the ownedGearIds record component
    • discoveredBlockIds

      @NotNull public @NotNull Set<String> discoveredBlockIds()
      Returns the value of the discoveredBlockIds record component.
      Returns:
      the value of the discoveredBlockIds record component
    • bedrockPlayer

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