Interface KitManager


public interface KitManager
Represents the KitManager singleton used by Duels.
  • Method Summary

    Modifier and Type
    Method
    Description
    create(org.bukkit.entity.Player creator, String name)
    Creates a kit with given name and Player's inventory contents.
    get(String name)
    Attempts to find an Kit instance associated with the given name.
    An UnmodifiableList of Kits that are currently loaded.
    remove(String name)
    Calls remove(CommandSender, String) with source being null.
    remove(org.bukkit.command.CommandSender source, String name)
    Removes a kit with given name.
  • Method Details

    • get

      @Nullable Kit get(@NotNull String name)
      Attempts to find an Kit instance associated with the given name.
      Parameters:
      name - Name to search through the loaded kits. Should not be null!
      Returns:
      Kit instance that has a name matching with the given name or null if not exists.
    • create

      @Nullable Kit create(@NotNull org.bukkit.entity.Player creator, @NotNull String name)
      Creates a kit with given name and Player's inventory contents. Note: Calls KitCreateEvent on successful creation.
      Parameters:
      creator - Player who is the creator of this kit.
      name - Name of the newly created Kit. Requires to be alphanumeric (underscore is allowed).
      Returns:
      The newly created Kit or null if a kit with given name already exists.
    • remove

      @Nullable Kit remove(@Nullable org.bukkit.command.CommandSender source, @NotNull String name)
      Removes a kit with given name. Note: Calls KitRemoveEvent on successful removal.
      Parameters:
      source - CommandSender who is the source of this call.
      name - Name of the kit to remove.
      Returns:
      The removed Kit or null if no Kit was found with the given name.
    • remove

      @Nullable Kit remove(@NotNull String name)
      Calls remove(CommandSender, String) with source being null.
      See Also:
    • getKits

      @NotNull List<Kit> getKits()
      An UnmodifiableList of Kits that are currently loaded.
      Returns:
      Never-null UnmodifiableList of Kits that are currently loaded.
      Since:
      3.1.0