public class WrappedGameProfile extends AbstractWrapper
| Modifier and Type | Field and Description |
|---|---|
static ReportType |
REPORT_INVALID_UUID |
handle, handleType| Constructor and Description |
|---|
WrappedGameProfile(String id,
String name)
Deprecated.
|
WrappedGameProfile(UUID uuid,
String name)
Construct a new game profile with the given properties.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static WrappedGameProfile |
fromHandle(Object handle)
Construct a wrapper around an existing game profile.
|
static WrappedGameProfile |
fromOfflinePlayer(org.bukkit.OfflinePlayer player)
Retrieve the associated game profile of an offline player.
|
static WrappedGameProfile |
fromPlayer(org.bukkit.entity.Player player)
Retrieve the associated game profile of a player.
|
String |
getId()
Retrieve the textual representation of the player's UUID.
|
String |
getName()
Retrieve the name of the player.
|
com.google.common.collect.Multimap<String,WrappedSignedProperty> |
getProperties()
Retrieve the property map of signed values.
|
UUID |
getUUID()
Retrieve the UUID of the player.
|
int |
hashCode() |
boolean |
isComplete()
Determine if the game profile contains both an UUID and a name.
|
String |
toString() |
WrappedGameProfile |
withId(String id)
Construct a new game profile with the same name, but different id.
|
WrappedGameProfile |
withName(String name)
Construct a new game profile with the same ID, but different name.
|
getHandle, getHandleType, setHandlepublic static final ReportType REPORT_INVALID_UUID
@Deprecated public WrappedGameProfile(String id, String name)
Note that this constructor is very lenient when parsing UUIDs for backwards compatibility reasons. IDs that cannot be parsed as an UUID will be hashed and form a version 3 UUID instead.
This method is deprecated for Minecraft 1.7.8 and above.
id - - the UUID of the player.name - - the name of the player.public static WrappedGameProfile fromPlayer(org.bukkit.entity.Player player)
Note that this may not exist in the current Minecraft version.
player - - the player.public static WrappedGameProfile fromOfflinePlayer(org.bukkit.OfflinePlayer player)
Note that this may not exist in the current Minecraft version.
player - - the offline player.public static WrappedGameProfile fromHandle(Object handle)
handle - - the underlying profile, or NULL.public UUID getUUID()
Note that Minecraft 1.7.5 and earlier doesn't use UUIDs internally, and it may not be possible to convert the string to an UUID.
We use the same lax conversion as in WrappedGameProfile(String, String).
IllegalStateException - If we cannot parse the internal ID as an UUID.public String getId()
Note that there's nothing stopping plugins from creating non-standard UUIDs.
In Minecraft 1.7.8 and later, this simply returns the string form of getUUID().
public String getName()
public com.google.common.collect.Multimap<String,WrappedSignedProperty> getProperties()
public WrappedGameProfile withName(String name)
name - - the new name of the profile to create.public WrappedGameProfile withId(String id)
id - - the new id of the profile to create.public boolean isComplete()
public String toString()
toString in class AbstractWrapperpublic int hashCode()
hashCode in class AbstractWrapperpublic boolean equals(Object obj)
equals in class AbstractWrapperCopyright © 2012–2017 Comphenix and dmulloy2. Licensed under the GNU GPL v2.