Record Class FakePlayerFactory.FakePlayerKey
java.lang.Object
java.lang.Record
net.neoforged.neoforge.common.util.FakePlayerFactory.FakePlayerKey
- Enclosing class:
FakePlayerFactory
private static record FakePlayerFactory.FakePlayerKey(ServerLevel level, com.mojang.authlib.GameProfile username)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ServerLevelThe field for thelevelrecord component.private final com.mojang.authlib.GameProfileThe field for theusernamerecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateFakePlayerKey(ServerLevel level, com.mojang.authlib.GameProfile username) Creates an instance of aFakePlayerKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.level()Returns the value of thelevelrecord component.final StringtoString()Returns a string representation of this record class.com.mojang.authlib.GameProfileusername()Returns the value of theusernamerecord component.
-
Field Details
-
level
The field for thelevelrecord component. -
username
private final com.mojang.authlib.GameProfile usernameThe field for theusernamerecord component.
-
-
Constructor Details
-
FakePlayerKey
Creates an instance of aFakePlayerKeyrecord class.- Parameters:
level- the value for thelevelrecord componentusername- the value for theusernamerecord component
-
-
Method Details
-
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). -
level
Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
username
public com.mojang.authlib.GameProfile username()Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-