java.lang.Object
org.mvplugins.multiverse.inventories.profile.container.ProfileContainer

public final class ProfileContainer extends Object
A container for player profiles in a given world or world group (based on getContainerType()),
Players may have separate profiles per game mode within this container if game mode profiles are enabled.
  • Method Details

    • listPlayerProfileNames

      public Collection<String> listPlayerProfileNames()
    • getProfileKey

      public ProfileKey getProfileKey(org.bukkit.entity.Player player)
    • getProfileKey

      public ProfileKey getProfileKey(ProfileType profileType, org.bukkit.OfflinePlayer player)
    • getPlayerData

      public CompletableFuture<PlayerProfile> getPlayerData(org.bukkit.entity.Player player)
    • getPlayerData

      public CompletableFuture<PlayerProfile> getPlayerData(ProfileType profileType, org.bukkit.OfflinePlayer player)
    • getPlayerProfileNow

      public PlayerProfile getPlayerProfileNow(org.bukkit.entity.Player player)
      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

      public PlayerProfile getPlayerProfileNow(ProfileType profileType, org.bukkit.OfflinePlayer player)
      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

      public CompletableFuture<Void> deletePlayerFile(org.bukkit.OfflinePlayer player)
      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

      public String 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

      public ContainerType getContainerType()
      Returns the container type for this container.
      Returns:
      the container type.
    • clearContainerCache

      public void clearContainerCache()
      Clears all cached data in the container.