Class ProfileContainer
java.lang.Object
org.mvplugins.multiverse.inventories.profile.container.ProfileContainer
A container for player profiles in a given world or world group (based on
Players may have separate profiles per game mode within this container if game mode profiles are enabled.
getContainerType()
),
Players may have separate profiles per game mode within this container if game mode profiles are enabled.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears all cached data in the container.deletePlayerFile
(org.bukkit.OfflinePlayer player) Removes all of the profile data for a given player in this profile container.deletePlayerProfile
(ProfileType profileType, org.bukkit.OfflinePlayer player) Removes the profile data for a specific type of profile in this profile container.Returns the name of this profile container which is primarily used for persistence purposes.Returns the container type for this container.getPlayerData
(org.bukkit.entity.Player player) getPlayerData
(ProfileType profileType, org.bukkit.OfflinePlayer player) getPlayerProfileNow
(org.bukkit.entity.Player player) Retrieves the profile for the given player.getPlayerProfileNow
(ProfileType profileType, org.bukkit.OfflinePlayer player) Retrieves the profile of the given type for the given player.getProfileKey
(org.bukkit.entity.Player player) getProfileKey
(ProfileType profileType, org.bukkit.OfflinePlayer player)
-
Method Details
-
listPlayerProfileNames
-
getProfileKey
-
getProfileKey
-
getPlayerData
-
getPlayerData
public CompletableFuture<PlayerProfile> getPlayerData(ProfileType profileType, org.bukkit.OfflinePlayer player) -
getPlayerProfileNow
Retrieves the profile for the given player.If game mode profiles are enabled, the profile for their current game mode will be returned, otherwise their survival profile will be returned.
- Parameters:
player
- Player to get profile for.- Returns:
- The profile for the given player.
-
getPlayerProfileNow
Retrieves the profile of the given type for the given player.- Parameters:
profileType
- The type of profile to get data for, typically Survival or Creative.player
- Player to get profile for.- Returns:
- The profile of the given type for the given player.
-
deletePlayerFile
Removes all of the profile data for a given player in this profile container.- Parameters:
player
- Player to remove data for.- Returns:
-
deletePlayerProfile
public CompletableFuture<Void> deletePlayerProfile(ProfileType profileType, org.bukkit.OfflinePlayer player) Removes the profile data for a specific type of profile in this profile container.- Parameters:
profileType
- The type of profile to remove data for.player
- Player to remove data for.- Returns:
-
getContainerName
Returns the name of this profile container which is primarily used for persistence purposes.The name reflects the world name if this is a world profile container, or the arbitrary group name if this is a world group profile container.
- Returns:
- The name to use to look up Data.
-
getContainerType
Returns the container type for this container.- Returns:
- the container type.
-
clearContainerCache
public void clearContainerCache()Clears all cached data in the container.
-