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
ConstructorsConstructorDescriptionPlayerProfile(@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 aPlayerProfilerecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublebalance()Returns the value of thebalancerecord component.booleanReturns the value of thebedrockPlayerrecord component.intcredits()Returns the value of thecreditsrecord component.Returns the value of thediscoveredBlockIdsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Stringname()Returns the value of thenamerecord component.Returns the value of theownedGearIdsrecord component.@Nullable PlotViewplot()Returns the value of theplotrecord component.intReturns the value of theprestigeLevelrecord component.intReturns the value of therebirthLevelrecord component.@NotNull List<StoredBlockView> Returns the value of thestoredBlocksrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalStolenrecord component.@NotNull UUIDuuid()Returns the value of theuuidrecord component.
-
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 aPlayerProfilerecord class.- Parameters:
uuid- the value for theuuidrecord componentname- the value for thenamerecord componentbalance- the value for thebalancerecord componentcredits- the value for thecreditsrecord componentrebirthLevel- the value for therebirthLevelrecord componentprestigeLevel- the value for theprestigeLevelrecord componenttotalStolen- the value for thetotalStolenrecord componentplot- the value for theplotrecord componentstoredBlocks- the value for thestoredBlocksrecord componentownedGearIds- the value for theownedGearIdsrecord componentdiscoveredBlockIds- the value for thediscoveredBlockIdsrecord componentbedrockPlayer- the value for thebedrockPlayerrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
uuid
Returns the value of theuuidrecord component.- Returns:
- the value of the
uuidrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
balance
public double balance()Returns the value of thebalancerecord component.- Returns:
- the value of the
balancerecord component
-
credits
public int credits()Returns the value of thecreditsrecord component.- Returns:
- the value of the
creditsrecord component
-
rebirthLevel
public int rebirthLevel()Returns the value of therebirthLevelrecord component.- Returns:
- the value of the
rebirthLevelrecord component
-
prestigeLevel
public int prestigeLevel()Returns the value of theprestigeLevelrecord component.- Returns:
- the value of the
prestigeLevelrecord component
-
totalStolen
public int totalStolen()Returns the value of thetotalStolenrecord component.- Returns:
- the value of the
totalStolenrecord component
-
plot
Returns the value of theplotrecord component.- Returns:
- the value of the
plotrecord component
-
storedBlocks
Returns the value of thestoredBlocksrecord component.- Returns:
- the value of the
storedBlocksrecord component
-
ownedGearIds
-
discoveredBlockIds
-
bedrockPlayer
public boolean bedrockPlayer()Returns the value of thebedrockPlayerrecord component.- Returns:
- the value of the
bedrockPlayerrecord component
-