Record Class SetTimePacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.SetTimePacket
- All Implemented Interfaces:
Packet, SendablePacket, ServerPacket, ServerPacket.Play
public record SetTimePacket(long gameTime, Map<RegistryKey<WorldClock>, SetTimePacket.ClockState> clocks)
extends Record
implements ServerPacket.Play
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a clock state update for time.Nested classes/interfaces inherited from interface ServerPacket
ServerPacket.ComponentHolding, ServerPacket.Configuration, ServerPacket.Handshake, ServerPacket.Login, ServerPacket.Play, ServerPacket.Status -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSetTimePacket(long gameTime, Map<RegistryKey<WorldClock>, SetTimePacket.ClockState> clocks) Creates an instance of aSetTimePacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionclocks()Returns the value of theclocksrecord component.final booleanIndicates whether some other object is "equal to" this one.longgameTime()Returns the value of thegameTimerecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
SetTimePacket
Creates an instance of aSetTimePacketrecord class.- Parameters:
gameTime- the value for thegameTimerecord componentclocks- the value for theclocksrecord 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. -
gameTime
public long gameTime()Returns the value of thegameTimerecord component.- Returns:
- the value of the
gameTimerecord component
-
clocks
Returns the value of theclocksrecord component.- Returns:
- the value of the
clocksrecord component
-