Record Class NetConnectionMetadata
java.lang.Object
java.lang.Record
com.xpdustry.distributor.common.audience.NetConnectionMetadata
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionNetConnectionMetadata(@Nullable com.xpdustry.distributor.api.player.MUUID muuid, com.xpdustry.distributor.api.component.style.ComponentColor color, @Nullable String name, @Nullable Locale locale) Creates an instance of aNetConnectionMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.xpdustry.distributor.api.component.style.ComponentColorcolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.static NetConnectionMetadatafrom(mindustry.net.Packets.ConnectPacket packet) final inthashCode()Returns a hash code value for this object.@Nullable Localelocale()Returns the value of thelocalerecord component.@Nullable com.xpdustry.distributor.api.player.MUUIDmuuid()Returns the value of themuuidrecord component.@Nullable Stringname()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NetConnectionMetadata
public NetConnectionMetadata(@Nullable com.xpdustry.distributor.api.player.MUUID muuid, com.xpdustry.distributor.api.component.style.ComponentColor color, @Nullable String name, @Nullable Locale locale) Creates an instance of aNetConnectionMetadatarecord class.- Parameters:
muuid- the value for themuuidrecord componentcolor- the value for thecolorrecord componentname- the value for thenamerecord componentlocale- the value for thelocalerecord component
-
-
Method Details
-
from
-
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). -
muuid
public @Nullable com.xpdustry.distributor.api.player.MUUID muuid()Returns the value of themuuidrecord component.- Returns:
- the value of the
muuidrecord component
-
color
public com.xpdustry.distributor.api.component.style.ComponentColor color()Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
locale
Returns the value of thelocalerecord component.- Returns:
- the value of the
localerecord component
-