Interface ContainerHolder<V,T extends Container<V>>
- Type Parameters:
V- Type which is contained in the containerT- Type of the container
public interface ContainerHolder<V,T extends Container<V>>
Interface which represents a container holder.
A container holder always contains containers for any requested player.
A container holder always contains a global container.
-
Method Summary
Modifier and TypeMethodDescriptionComplete container valuescompleteGlobal(String arg) complete global container valuescompletePlayer(Player player, String arg) Complete player container valuesdefault TcontainerByName(Player player, String name) Returns the global or player container based on the name providedcount()Get the count of all existing presetsGet global containerdefault voidmigrate(ContainerHolder<V, T> container) Method to merge a container into this container.playerContainer(UUID player) Get container of a playerdefault TplayerContainer(Player player) Get container of a playerCompletableFuture<Map<UUID, ? extends T>> Get all player containers
-
Method Details
-
playerContainer
Get container of a player- Parameters:
player- player- Returns:
- container of the player
-
containerByName
Returns the global or player container based on the name provided- Parameters:
player- playername- preset name- Returns:
- container, which holds the player or global presets
-
playerContainer
Get container of a player- Parameters:
player- player- Returns:
- container of the player
-
globalContainer
T globalContainer()Get global container- Returns:
- global container
-
playerContainers
CompletableFuture<Map<UUID,? extends T>> playerContainers()Get all player containers- Returns:
- all player containers in a map with the player uuid and associated presets
-
complete
Complete container values- Parameters:
player- playerarg- arguments to complete- Returns:
- list of possible values
-
completeGlobal
complete global container values- Parameters:
arg- name- Returns:
- list of matching values
-
completePlayer
Complete player container values- Parameters:
player- playerarg- name- Returns:
- list of matching values
-
count
CompletableFuture<Integer> count()Get the count of all existing presets- Returns:
- preset count
-
migrate
Method to merge a container into this container.This will override entries if they already exist with the same name. This will not remove already existing entries.
- Parameters:
container- container to merge
-