public class WrappedGameProfile extends AbstractWrapper
handle, handleType| Constructor and Description |
|---|
WrappedGameProfile(java.lang.String id,
java.lang.String name)
Construct a new game profile with the given properties.
|
WrappedGameProfile(java.util.UUID uuid,
java.lang.String name)
Construct a new game profile with the given properties.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
static WrappedGameProfile |
fromHandle(java.lang.Object handle)
Construct a wrapper around an existing game profile.
|
java.lang.String |
getId()
Retrieve the UUID of the player.
|
java.lang.String |
getName()
Retrieve the name of the player.
|
int |
hashCode() |
boolean |
isComplete()
Determine if the game profile contains both an UUID and a name.
|
java.lang.String |
toString() |
WrappedGameProfile |
withId(java.lang.String id)
Construct a new game profile with the same name, but different id.
|
WrappedGameProfile |
withName(java.lang.String name)
Construct a new game profile with the same ID, but different name.
|
getHandle, getHandleType, setHandlepublic WrappedGameProfile(java.lang.String id,
java.lang.String name)
Note that this constructor is very lenient when parsing UUIDs for backwards compatibility reasons. Thus - "", " ", "0" and "0-0-0-0" are all equivalent to the the UUID "00000000-0000-0000-0000-000000000000".
id - - the UUID of the player.name - - the name of the player.public WrappedGameProfile(java.util.UUID uuid,
java.lang.String name)
Note that at least one of the parameters must be non-null.
uuid - - the UUID of the player, or NULL.name - - the name of the player, or NULL.public static WrappedGameProfile fromHandle(java.lang.Object handle)
profile - - the underlying profile, or NULL.public java.lang.String getId()
public java.lang.String getName()
public WrappedGameProfile withName(java.lang.String name)
name - - the new name of the profile to create.public WrappedGameProfile withId(java.lang.String id)
id - - the new id of the profile to create.public boolean isComplete()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object