Package be.seeseemelk.mockbukkit.profile
Class PlayerProfileMock
java.lang.Object
be.seeseemelk.mockbukkit.profile.PlayerProfileMock
- All Implemented Interfaces:
com.destroystokyo.paper.profile.PlayerProfile,Cloneable,org.bukkit.configuration.serialization.ConfigurationSerializable,org.bukkit.profile.PlayerProfile
public class PlayerProfileMock
extends Object
implements com.destroystokyo.paper.profile.PlayerProfile
Mock implementation of a
PlayerProfile.-
Constructor Summary
ConstructorsConstructorDescriptionPlayerProfileMock(@NotNull com.destroystokyo.paper.profile.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 org.bukkit.OfflinePlayer player) Constructs a newPlayerProfileMockfor anOfflinePlayer. -
Method Summary
Modifier and TypeMethodDescriptionvoid@NotNull org.bukkit.profile.PlayerProfileclone()booleancomplete(boolean textures) booleancomplete(boolean textures, boolean onlineMode) booleanbooleancompleteFromCache(boolean onlineMode) booleancompleteFromCache(boolean lookupUUID, boolean onlineMode) boolean@Nullable UUIDgetId()@Nullable StringgetName()@NotNull Set<com.destroystokyo.paper.profile.ProfileProperty> @Nullable com.destroystokyo.paper.profile.ProfilePropertygetProperty(@Nullable String property) @NotNull org.bukkit.profile.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<com.destroystokyo.paper.profile.ProfileProperty> properties) voidsetProperty(@NotNull com.destroystokyo.paper.profile.ProfileProperty property) voidsetTextures(@Nullable org.bukkit.profile.PlayerTextures textures) @NotNull StringtoString()@NotNull CompletableFuture<com.destroystokyo.paper.profile.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
@Internal public PlayerProfileMock(@NotNull @NotNull org.bukkit.OfflinePlayer player) 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
@Internal public PlayerProfileMock(@NotNull @NotNull com.destroystokyo.paper.profile.PlayerProfile profile) Constructs a newPlayerProfileMock, cloning the data from another.- Parameters:
profile- The profile to clone.
-
-
Method Details
-
getUniqueId
Deprecated.- Specified by:
getUniqueIdin interfaceorg.bukkit.profile.PlayerProfile
-
getName
- Specified by:
getNamein interfacecom.destroystokyo.paper.profile.PlayerProfile- Specified by:
getNamein interfaceorg.bukkit.profile.PlayerProfile
-
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 interfacecom.destroystokyo.paper.profile.PlayerProfile
-
getId
- Specified by:
getIdin interfacecom.destroystokyo.paper.profile.PlayerProfile
-
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 interfacecom.destroystokyo.paper.profile.PlayerProfile
-
getTextures
@NotNull public @NotNull org.bukkit.profile.PlayerTextures getTextures()- Specified by:
getTexturesin interfacecom.destroystokyo.paper.profile.PlayerProfile- Specified by:
getTexturesin interfaceorg.bukkit.profile.PlayerProfile
-
setTextures
public void setTextures(@Nullable @Nullable org.bukkit.profile.PlayerTextures textures) - Specified by:
setTexturesin interfacecom.destroystokyo.paper.profile.PlayerProfile- Specified by:
setTexturesin interfaceorg.bukkit.profile.PlayerProfile
-
getProperties
- Specified by:
getPropertiesin interfacecom.destroystokyo.paper.profile.PlayerProfile
-
hasProperty
- Specified by:
hasPropertyin interfacecom.destroystokyo.paper.profile.PlayerProfile
-
getProperty
@Nullable public @Nullable com.destroystokyo.paper.profile.ProfileProperty getProperty(@Nullable @Nullable String property) -
setProperty
public void setProperty(@NotNull @NotNull com.destroystokyo.paper.profile.ProfileProperty property) - Specified by:
setPropertyin interfacecom.destroystokyo.paper.profile.PlayerProfile
-
setProperties
public void setProperties(@NotNull @NotNull Collection<com.destroystokyo.paper.profile.ProfileProperty> properties) - Specified by:
setPropertiesin interfacecom.destroystokyo.paper.profile.PlayerProfile
-
removeProperty
- Specified by:
removePropertyin interfacecom.destroystokyo.paper.profile.PlayerProfile
-
clearProperties
public void clearProperties()- Specified by:
clearPropertiesin interfacecom.destroystokyo.paper.profile.PlayerProfile
-
isComplete
public boolean isComplete()- Specified by:
isCompletein interfacecom.destroystokyo.paper.profile.PlayerProfile- Specified by:
isCompletein interfaceorg.bukkit.profile.PlayerProfile
-
update
- Specified by:
updatein interfacecom.destroystokyo.paper.profile.PlayerProfile- Specified by:
updatein interfaceorg.bukkit.profile.PlayerProfile
-
completeFromCache
public boolean completeFromCache()- Specified by:
completeFromCachein interfacecom.destroystokyo.paper.profile.PlayerProfile
-
completeFromCache
public boolean completeFromCache(boolean onlineMode) - Specified by:
completeFromCachein interfacecom.destroystokyo.paper.profile.PlayerProfile
-
completeFromCache
public boolean completeFromCache(boolean lookupUUID, boolean onlineMode) - Specified by:
completeFromCachein interfacecom.destroystokyo.paper.profile.PlayerProfile
-
complete
public boolean complete(boolean textures) - Specified by:
completein interfacecom.destroystokyo.paper.profile.PlayerProfile
-
complete
public boolean complete(boolean textures, boolean onlineMode) - Specified by:
completein interfacecom.destroystokyo.paper.profile.PlayerProfile
-
serialize
- Specified by:
serializein interfaceorg.bukkit.configuration.serialization.ConfigurationSerializable
-
hashCode
public int hashCode() -
equals
-
toString
-
clone
public @NotNull org.bukkit.profile.PlayerProfile clone() -
validateSkullProfile
Checks if a PlayerProfile is valid to be on a Skull.- Parameters:
profile- The profile to check.
-