Record Class TeleportMessage
java.lang.Object
java.lang.Record
fr.ghostrider584.axiom.network.packet.client.TeleportMessage
- All Implemented Interfaces:
net.minestom.server.network.packet.client.ClientPacket
public record TeleportMessage(net.kyori.adventure.key.Key dimension, net.minestom.server.coordinate.Pos position)
extends Record
implements net.minestom.server.network.packet.client.ClientPacket
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minestom.server.network.NetworkBuffer.Type<TeleportMessage> -
Constructor Summary
ConstructorsConstructorDescriptionTeleportMessage(net.kyori.adventure.key.Key dimension, net.minestom.server.coordinate.Pos position) Creates an instance of aTeleportMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.kyori.adventure.key.KeyReturns the value of thedimensionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minestom.server.coordinate.Posposition()Returns the value of thepositionrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
TYPE
-
-
Constructor Details
-
TeleportMessage
public TeleportMessage(net.kyori.adventure.key.Key dimension, net.minestom.server.coordinate.Pos position) Creates an instance of aTeleportMessagerecord class.- Parameters:
dimension- the value for thedimensionrecord componentposition- the value for thepositionrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
dimension
public net.kyori.adventure.key.Key dimension()Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-
position
public net.minestom.server.coordinate.Pos position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-