Record Class CommonTranslationData.Impl

java.lang.Object
java.lang.Record
org.geysermc.geyser.translator.data.CommonTranslationData.Impl
All Implemented Interfaces:
JavaRegistryProvider.Provider, CommonTranslationData, TextTranslator, TextTranslator.LocaleBased
Enclosing interface:
CommonTranslationData

public static record CommonTranslationData.Impl(GeyserEventBus eventBus, org.geysermc.geyser.api.connection.GeyserConnection connection, org.geysermc.geyser.api.util.PlatformType platformType, JavaRegistryProvider javaRegistries, String locale) extends Record implements CommonTranslationData
  • Constructor Details

    • Impl

      public Impl(GeyserSession session)
    • Impl

      public Impl(@Deprecated GeyserEventBus eventBus, @Deprecated org.geysermc.geyser.api.connection.GeyserConnection connection, org.geysermc.geyser.api.util.PlatformType platformType, JavaRegistryProvider javaRegistries, String locale)
      Creates an instance of a Impl record class.
      Parameters:
      eventBus - the value for the eventBus record component
      connection - the value for the connection record component
      platformType - the value for the platformType record component
      javaRegistries - the value for the javaRegistries record component
      locale - the value for the locale record component
  • Method Details

    • fireConnectionEvent

      public <T extends org.geysermc.event.Event> T fireConnectionEvent(Function<org.geysermc.geyser.api.connection.GeyserConnection,T> constructor)
      Specified by:
      fireConnectionEvent in interface CommonTranslationData
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • eventBus

      @Deprecated public GeyserEventBus eventBus()
      Deprecated.
      Returns the value of the eventBus record component.
      Returns:
      the value of the eventBus record component
    • connection

      @Deprecated public org.geysermc.geyser.api.connection.GeyserConnection connection()
      Deprecated.
      Returns the value of the connection record component.
      Returns:
      the value of the connection record component
    • platformType

      public org.geysermc.geyser.api.util.PlatformType platformType()
      Returns the value of the platformType record component.
      Specified by:
      platformType in interface CommonTranslationData
      Returns:
      the value of the platformType record component
    • javaRegistries

      public JavaRegistryProvider javaRegistries()
      Returns the value of the javaRegistries record component.
      Specified by:
      javaRegistries in interface JavaRegistryProvider.Provider
      Returns:
      the value of the javaRegistries record component
    • locale

      public String locale()
      Returns the value of the locale record component.
      Specified by:
      locale in interface TextTranslator.LocaleBased
      Returns:
      the value of the locale record component