Record Class PlayerInfoPacket.UpdateGameMode
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.PlayerInfoPacket.UpdateGameMode
- All Implemented Interfaces:
PlayerInfoPacket.Entry
,Writeable
- Enclosing class:
- PlayerInfoPacket
public static record PlayerInfoPacket.UpdateGameMode(UUID uuid, GameMode gameMode)
extends Record
implements PlayerInfoPacket.Entry
-
Constructor Summary
ConstructorsConstructorDescriptionUpdateGameMode
(UUID uuid, GameMode gameMode) Creates an instance of aUpdateGameMode
record class.UpdateGameMode
(UUID uuid, BinaryReader reader) -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.gameMode()
Returns the value of thegameMode
record component.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.uuid()
Returns the value of theuuid
record component.void
write
(BinaryWriter writer) Writes into aBinaryWriter
.
-
Constructor Details
-
UpdateGameMode
-
UpdateGameMode
Creates an instance of aUpdateGameMode
record class.- Parameters:
uuid
- the value for theuuid
record componentgameMode
- the value for thegameMode
record component
-
-
Method Details
-
write
Description copied from interface:Writeable
Writes into aBinaryWriter
. -
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. -
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. -
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
uuid
Returns the value of theuuid
record component.- Specified by:
uuid
in interfacePlayerInfoPacket.Entry
- Returns:
- the value of the
uuid
record component
-
gameMode
Returns the value of thegameMode
record component.- Returns:
- the value of the
gameMode
record component
-