Record Class GeyserNetwork.MessageDefinition<T extends org.geysermc.geyser.api.network.message.MessageBuffer,M extends org.geysermc.geyser.api.network.message.Message<T>>

java.lang.Object
java.lang.Record
org.geysermc.geyser.network.GeyserNetwork.MessageDefinition<T,M>
Enclosing class:
GeyserNetwork

public static record GeyserNetwork.MessageDefinition<T extends org.geysermc.geyser.api.network.message.MessageBuffer,M extends org.geysermc.geyser.api.network.message.Message<T>>(@NonNull org.geysermc.geyser.api.network.message.MessageCodec<T extends org.geysermc.geyser.api.network.message.MessageBuffer> codec, @NonNull org.geysermc.geyser.api.network.message.MessageFactory<T extends org.geysermc.geyser.api.network.message.MessageBuffer,M extends org.geysermc.geyser.api.network.message.Message<T>> messageFactory, @Nullable org.geysermc.geyser.api.network.message.MessageHandler<M extends org.geysermc.geyser.api.network.message.Message<T>> handler, org.geysermc.geyser.api.network.message.MessageHandler.Sided<M extends org.geysermc.geyser.api.network.message.Message<T>> clientboundHandler, org.geysermc.geyser.api.network.message.MessageHandler.Sided<M extends org.geysermc.geyser.api.network.message.Message<T>> serverboundHandler, int priority, @Nullable Integer clientboundPriority, @Nullable Integer serverboundPriority, @Nullable org.geysermc.geyser.api.network.ProtocolState state, @Nullable String tag, @Nullable String beforeTag, @Nullable String afterTag) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    MessageDefinition(@NonNull org.geysermc.geyser.api.network.message.MessageCodec<T> codec, @NonNull org.geysermc.geyser.api.network.message.MessageFactory<T,M> messageFactory, @Nullable org.geysermc.geyser.api.network.message.MessageHandler<M> handler, org.geysermc.geyser.api.network.message.MessageHandler.Sided<M> clientboundHandler, org.geysermc.geyser.api.network.message.MessageHandler.Sided<M> serverboundHandler, int priority, @Nullable Integer clientboundPriority, @Nullable Integer serverboundPriority, @Nullable org.geysermc.geyser.api.network.ProtocolState state, @Nullable String tag, @Nullable String beforeTag, @Nullable String afterTag)
    Creates an instance of a MessageDefinition record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable String
    Returns the value of the afterTag record component.
    @Nullable String
    Returns the value of the beforeTag record component.
    org.geysermc.geyser.api.network.message.MessageHandler.Sided<M>
    Returns the value of the clientboundHandler record component.
    @Nullable Integer
    Returns the value of the clientboundPriority record component.
    @NonNull org.geysermc.geyser.api.network.message.MessageCodec<T>
    Returns the value of the codec record component.
    @NonNull T
    createBuffer(byte @NonNull [] data)
     
    @NonNull M
    createMessage(@NonNull T buffer)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    @Nullable org.geysermc.geyser.api.network.message.MessageHandler<M>
    Returns the value of the handler record component.
    final int
    Returns a hash code value for this object.
    @NonNull org.geysermc.geyser.api.network.message.MessageFactory<T,M>
    Returns the value of the messageFactory record component.
    int
    Returns the value of the priority record component.
    int
    priority(@NonNull org.geysermc.geyser.api.network.MessageDirection direction)
     
    org.geysermc.geyser.api.network.message.MessageHandler.Sided<M>
    Returns the value of the serverboundHandler record component.
    @Nullable Integer
    Returns the value of the serverboundPriority record component.
    @Nullable org.geysermc.geyser.api.network.ProtocolState
    Returns the value of the state record component.
    @Nullable String
    tag()
    Returns the value of the tag record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • MessageDefinition

      public MessageDefinition(@NonNull org.geysermc.geyser.api.network.message.MessageCodec<T> codec, @NonNull org.geysermc.geyser.api.network.message.MessageFactory<T,M> messageFactory, @Nullable org.geysermc.geyser.api.network.message.MessageHandler<M> handler, org.geysermc.geyser.api.network.message.MessageHandler.Sided<M> clientboundHandler, org.geysermc.geyser.api.network.message.MessageHandler.Sided<M> serverboundHandler, int priority, @Nullable Integer clientboundPriority, @Nullable Integer serverboundPriority, @Nullable org.geysermc.geyser.api.network.ProtocolState state, @Nullable String tag, @Nullable String beforeTag, @Nullable String afterTag)
      Creates an instance of a MessageDefinition record class.
      Parameters:
      codec - the value for the codec record component
      messageFactory - the value for the messageFactory record component
      handler - the value for the handler record component
      clientboundHandler - the value for the clientboundHandler record component
      serverboundHandler - the value for the serverboundHandler record component
      priority - the value for the priority record component
      clientboundPriority - the value for the clientboundPriority record component
      serverboundPriority - the value for the serverboundPriority record component
      state - the value for the state record component
      tag - the value for the tag record component
      beforeTag - the value for the beforeTag record component
      afterTag - the value for the afterTag record component
  • Method Details

    • createBuffer

      public @NonNull T createBuffer(byte @NonNull [] data)
    • createMessage

      public @NonNull M createMessage(@NonNull T buffer)
    • priority

      public int priority(@NonNull org.geysermc.geyser.api.network.MessageDirection direction)
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • codec

      public @NonNull org.geysermc.geyser.api.network.message.MessageCodec<T> codec()
      Returns the value of the codec record component.
      Returns:
      the value of the codec record component
    • messageFactory

      public @NonNull org.geysermc.geyser.api.network.message.MessageFactory<T,M> messageFactory()
      Returns the value of the messageFactory record component.
      Returns:
      the value of the messageFactory record component
    • handler

      public @Nullable org.geysermc.geyser.api.network.message.MessageHandler<M> handler()
      Returns the value of the handler record component.
      Returns:
      the value of the handler record component
    • clientboundHandler

      public org.geysermc.geyser.api.network.message.MessageHandler.Sided<M> clientboundHandler()
      Returns the value of the clientboundHandler record component.
      Returns:
      the value of the clientboundHandler record component
    • serverboundHandler

      public org.geysermc.geyser.api.network.message.MessageHandler.Sided<M> serverboundHandler()
      Returns the value of the serverboundHandler record component.
      Returns:
      the value of the serverboundHandler record component
    • priority

      public int priority()
      Returns the value of the priority record component.
      Returns:
      the value of the priority record component
    • clientboundPriority

      public @Nullable Integer clientboundPriority()
      Returns the value of the clientboundPriority record component.
      Returns:
      the value of the clientboundPriority record component
    • serverboundPriority

      public @Nullable Integer serverboundPriority()
      Returns the value of the serverboundPriority record component.
      Returns:
      the value of the serverboundPriority record component
    • state

      public @Nullable org.geysermc.geyser.api.network.ProtocolState state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • tag

      public @Nullable String tag()
      Returns the value of the tag record component.
      Returns:
      the value of the tag record component
    • beforeTag

      public @Nullable String beforeTag()
      Returns the value of the beforeTag record component.
      Returns:
      the value of the beforeTag record component
    • afterTag

      public @Nullable String afterTag()
      Returns the value of the afterTag record component.
      Returns:
      the value of the afterTag record component