Record Class OfflinePlayerSnapshot
java.lang.Object
java.lang.Record
fr.fidorial.entity.OfflinePlayerSnapshot
- Record Components:
uuid- the identity this state belongs togameMode- the game mode held at the time of readinginventory- a detached copy of the player inventoryenderChest- a detached copy of the ender chestlive-trueif the state was read from a connected player,falseif it was read from storage
public record OfflinePlayerSnapshot(UUID uuid, GameMode gameMode, PlayerInventory inventory, EnderChestInventory enderChest, boolean live)
extends Record
The state of a player at the moment it was read.
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionOfflinePlayerSnapshot(UUID uuid, GameMode gameMode, PlayerInventory inventory, EnderChestInventory enderChest, boolean live) Creates an instance of aOfflinePlayerSnapshotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theenderChestrecord component.final booleanIndicates whether some other object is "equal to" this one.gameMode()Returns the value of thegameModerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinventoryrecord component.booleanlive()Returns the value of theliverecord component.final StringtoString()Returns a string representation of this record class.uuid()Returns the value of theuuidrecord component.
-
Constructor Details
-
OfflinePlayerSnapshot
public OfflinePlayerSnapshot(UUID uuid, GameMode gameMode, PlayerInventory inventory, EnderChestInventory enderChest, boolean live) Creates an instance of aOfflinePlayerSnapshotrecord class.- Parameters:
uuid- the value for theuuidrecord componentgameMode- the value for thegameModerecord componentinventory- the value for theinventoryrecord componentenderChest- the value for theenderChestrecord componentlive- the value for theliverecord 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
-
gameMode
-
inventory
-
enderChest
Returns the value of theenderChestrecord component.- Returns:
- the value of the
enderChestrecord component
-
live
-