Interface ContainerHolder<V,T extends Container<V>>

Type Parameters:
V - Type which is contained in the container
T - Type of the container
All Known Subinterfaces:
Brushes, Presets

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 Details

    • playerContainer

      default T playerContainer(Player player)
      Get container of a player
      Parameters:
      player - player
      Returns:
      container of the player
    • containerByName

      default T containerByName(Player player, String name)
      Returns the global or player container based on the name provided
      Parameters:
      player - player
      name - preset name
      Returns:
      container, which holds the player or global presets
    • playerContainer

      T playerContainer(UUID player)
      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

      default List<String> complete(Player player, String arg)
      Complete container values
      Parameters:
      player - player
      arg - arguments to complete
      Returns:
      list of possible values
    • completeGlobal

      default List<String> completeGlobal(String arg)
      complete global container values
      Parameters:
      arg - name
      Returns:
      list of matching values
    • completePlayer

      default List<String> completePlayer(Player player, String arg)
      Complete player container values
      Parameters:
      player - player
      arg - name
      Returns:
      list of matching values
    • count

      Get the count of all existing presets
      Returns:
      preset count
    • migrate

      default void migrate(ContainerHolder<V,T> container)
      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