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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.geysermc.geyser.translator.data.CommonTranslationData
CommonTranslationData.Impl, CommonTranslationData.RecordBasedNested classes/interfaces inherited from interface org.geysermc.geyser.translator.text.TextTranslator
TextTranslator.LocaleBased -
Constructor Summary
ConstructorsConstructorDescriptionImpl(GeyserEventBus eventBus, org.geysermc.geyser.api.connection.GeyserConnection connection, org.geysermc.geyser.api.util.PlatformType platformType, JavaRegistryProvider javaRegistries, String locale) Creates an instance of aImplrecord class.Impl(GeyserSession session) -
Method Summary
Modifier and TypeMethodDescriptionorg.geysermc.geyser.api.connection.GeyserConnectionDeprecated.final booleanIndicates whether some other object is "equal to" this one.eventBus()Deprecated.<T extends org.geysermc.event.Event>
TfireConnectionEvent(Function<org.geysermc.geyser.api.connection.GeyserConnection, T> constructor) final inthashCode()Returns a hash code value for this object.Returns the value of thejavaRegistriesrecord component.locale()Returns the value of thelocalerecord component.org.geysermc.geyser.api.util.PlatformTypeReturns the value of theplatformTyperecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.geyser.translator.data.CommonTranslationData
fireEventMethods inherited from interface org.geysermc.geyser.translator.text.TextTranslator.LocaleBased
convertText
-
Constructor Details
-
Impl
-
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 aImplrecord class.- Parameters:
eventBus- the value for theeventBusrecord componentconnection- the value for theconnectionrecord componentplatformType- the value for theplatformTyperecord componentjavaRegistries- the value for thejavaRegistriesrecord componentlocale- the value for thelocalerecord component
-
-
Method Details
-
fireConnectionEvent
public <T extends org.geysermc.event.Event> T fireConnectionEvent(Function<org.geysermc.geyser.api.connection.GeyserConnection, T> constructor) - Specified by:
fireConnectionEventin interfaceCommonTranslationData
-
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). -
eventBus
Deprecated.Returns the value of theeventBusrecord component.- Returns:
- the value of the
eventBusrecord component
-
connection
Deprecated.Returns the value of theconnectionrecord component.- Returns:
- the value of the
connectionrecord component
-
platformType
public org.geysermc.geyser.api.util.PlatformType platformType()Returns the value of theplatformTyperecord component.- Specified by:
platformTypein interfaceCommonTranslationData- Returns:
- the value of the
platformTyperecord component
-
javaRegistries
Returns the value of thejavaRegistriesrecord component.- Specified by:
javaRegistriesin interfaceJavaRegistryProvider.Provider- Returns:
- the value of the
javaRegistriesrecord component
-
locale
Returns the value of thelocalerecord component.- Specified by:
localein interfaceTextTranslator.LocaleBased- Returns:
- the value of the
localerecord component
-