Package net.minecraftforge.common.util
Record Class FakePlayerFactory.FakePlayerKey
java.lang.Object
java.lang.Record
net.minecraftforge.common.util.FakePlayerFactory.FakePlayerKey
- Enclosing class:
- FakePlayerFactory
private static record FakePlayerFactory.FakePlayerKey(ServerLevel level, com.mojang.authlib.GameProfile username)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ServerLevel
The field for thelevel
record component.private final com.mojang.authlib.GameProfile
The field for theusername
record component. -
Constructor Summary
ModifierConstructorDescriptionprivate
FakePlayerKey
(ServerLevel level, com.mojang.authlib.GameProfile username) Creates an instance of aFakePlayerKey
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.level()
Returns the value of thelevel
record component.final String
toString()
Returns a string representation of this record class.com.mojang.authlib.GameProfile
username()
Returns the value of theusername
record component.
-
Field Details
-
level
The field for thelevel
record component. -
username
private final com.mojang.authlib.GameProfile usernameThe field for theusername
record component.
-
-
Constructor Details
-
FakePlayerKey
Creates an instance of aFakePlayerKey
record class.- Parameters:
level
- the value for thelevel
record componentusername
- the value for theusername
record 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 thelevel
record component.- Returns:
- the value of the
level
record component
-
username
public com.mojang.authlib.GameProfile username()Returns the value of theusername
record component.- Returns:
- the value of the
username
record component
-