Package be.seeseemelk.mockbukkit.profile
Class PlayerProfileMock
java.lang.Object
be.seeseemelk.mockbukkit.profile.PlayerProfileMock
- All Implemented Interfaces:
PlayerProfile,Cloneable,ConfigurationSerializable,PlayerProfile
Mock implementation of a
PlayerProfile.-
Constructor Summary
ConstructorsConstructorDescriptionPlayerProfileMock(@NotNull PlayerProfile profile) Constructs a newPlayerProfileMock, cloning the data from another.PlayerProfileMock(@Nullable String name, @Nullable UUID uuid) Constructs a newPlayerProfileMockwith a name andUUID.PlayerProfileMock(@NotNull OfflinePlayer player) Constructs a newPlayerProfileMockfor anOfflinePlayer. -
Method Summary
Modifier and TypeMethodDescriptionvoid@NotNull PlayerProfileclone()booleancomplete(boolean textures) booleancomplete(boolean textures, boolean onlineMode) booleanbooleancompleteFromCache(boolean onlineMode) booleancompleteFromCache(boolean lookupUUID, boolean onlineMode) boolean@Nullable UUIDgetId()@Nullable StringgetName()@NotNull Set<ProfileProperty> @Nullable ProfilePropertygetProperty(@Nullable String property) @NotNull PlayerTextures@Nullable UUIDDeprecated.inthashCode()booleanhasProperty(@Nullable String property) booleanbooleanremoveProperty(@Nullable String property) @Nullable UUIDDeprecated, for removal: This API element is subject to removal in a future version.@NotNull StringDeprecated, for removal: This API element is subject to removal in a future version.voidsetProperties(@NotNull Collection<ProfileProperty> properties) voidsetProperty(@NotNull ProfileProperty property) voidsetTextures(@Nullable PlayerTextures textures) @NotNull StringtoString()@NotNull CompletableFuture<PlayerProfile> update()static voidvalidateSkullProfile(@NotNull PlayerProfileMock profile) Checks if a PlayerProfile is valid to be on a Skull.Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.destroystokyo.paper.profile.PlayerProfile
complete, hasTextures, removeProperties, removeProperty
-
Constructor Details
-
PlayerProfileMock
Constructs a newPlayerProfileMockfor anOfflinePlayer.- Parameters:
player- The player.
-
PlayerProfileMock
Constructs a newPlayerProfileMockwith a name andUUID.- Parameters:
name- The name of the player.uuid- The UUID of the player.
-
PlayerProfileMock
Constructs a newPlayerProfileMock, cloning the data from another.- Parameters:
profile- The profile to clone.
-
-
Method Details
-
getUniqueId
Deprecated.- Specified by:
getUniqueIdin interfacePlayerProfile
-
getName
- Specified by:
getNamein interfacePlayerProfile- Specified by:
getNamein interfacePlayerProfile
-
setName
@Deprecated(since="1.18", forRemoval=true) @NotNull public @NotNull String setName(@Nullable @Nullable String name) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setNamein interfacePlayerProfile
-
getId
- Specified by:
getIdin interfacePlayerProfile
-
setId
@Deprecated(since="1.18", forRemoval=true) @Nullable public @Nullable UUID setId(@Nullable @Nullable UUID uuid) Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setIdin interfacePlayerProfile
-
getTextures
- Specified by:
getTexturesin interfacePlayerProfile- Specified by:
getTexturesin interfacePlayerProfile
-
setTextures
- Specified by:
setTexturesin interfacePlayerProfile- Specified by:
setTexturesin interfacePlayerProfile
-
getProperties
- Specified by:
getPropertiesin interfacePlayerProfile
-
hasProperty
- Specified by:
hasPropertyin interfacePlayerProfile
-
getProperty
-
setProperty
- Specified by:
setPropertyin interfacePlayerProfile
-
setProperties
- Specified by:
setPropertiesin interfacePlayerProfile
-
removeProperty
- Specified by:
removePropertyin interfacePlayerProfile
-
clearProperties
public void clearProperties()- Specified by:
clearPropertiesin interfacePlayerProfile
-
isComplete
public boolean isComplete()- Specified by:
isCompletein interfacePlayerProfile- Specified by:
isCompletein interfacePlayerProfile
-
update
- Specified by:
updatein interfacePlayerProfile- Specified by:
updatein interfacePlayerProfile
-
completeFromCache
public boolean completeFromCache()- Specified by:
completeFromCachein interfacePlayerProfile
-
completeFromCache
public boolean completeFromCache(boolean onlineMode) - Specified by:
completeFromCachein interfacePlayerProfile
-
completeFromCache
public boolean completeFromCache(boolean lookupUUID, boolean onlineMode) - Specified by:
completeFromCachein interfacePlayerProfile
-
complete
public boolean complete(boolean textures) - Specified by:
completein interfacePlayerProfile
-
complete
public boolean complete(boolean textures, boolean onlineMode) - Specified by:
completein interfacePlayerProfile
-
serialize
- Specified by:
serializein interfaceConfigurationSerializable
-
hashCode
public int hashCode() -
equals
-
toString
-
clone
- Specified by:
clonein interfacePlayerProfile- Overrides:
clonein classObject
-
validateSkullProfile
Checks if a PlayerProfile is valid to be on a Skull.- Parameters:
profile- The profile to check.
-