Interface KitAPI


public interface KitAPI
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cache(@NotNull String name, @NotNull Kit kit)
    Caches a kit in memory.
    void
    create(@NotNull org.bukkit.entity.Player player, @NotNull String name)
    Creates a new kit based on the player's current inventory.
    void
    delete(@NotNull org.bukkit.entity.Player player, @NotNull String name)
    Deletes a kit by name.
    boolean
    exists(@NotNull String name)
    Checks if a kit exists.
    @NotNull @Unmodifiable List<Kit>
    Retrieves all enabled kits.
    @Unmodifiable List<Kit>
    Retrieves all kits.
    @Nullable Kit
    getKit(@NotNull String name)
    Retrieves a raw Kit object.
    void
    give(@NotNull org.bukkit.entity.Player target, @NotNull String name)
    Gives a kit to the specified player.
    @NotNull List<String>
    Retrieves a list of all available kit names.
    void
    load(@NotNull String name)
    Loads a specific kit by name.
    void
    Loads all kits from storage.
    void
    save(@NotNull String name, @NotNull Kit kit)
    Saves a kit to storage.
  • Method Details

    • loadAll

      void loadAll()
      Loads all kits from storage.
    • load

      void load(@NotNull @NotNull String name)
      Loads a specific kit by name.
      Parameters:
      name - the name of the kit to load
    • create

      void create(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String name)
      Creates a new kit based on the player's current inventory.
      Parameters:
      player - the player whose inventory will be used to create the kit
      name - the name of the new kit
    • give

      void give(@NotNull @NotNull org.bukkit.entity.Player target, @NotNull @NotNull String name)
      Gives a kit to the specified player.
      Parameters:
      target - the player to receive the kit
      name - the name of the kit
    • delete

      void delete(@NotNull @NotNull org.bukkit.entity.Player player, @NotNull @NotNull String name)
      Deletes a kit by name.
      Parameters:
      player - the player executing the delete action
      name - the name of the kit to delete
    • list

      @NotNull @CanIgnoreReturnValue @NotNull List<String> list()
      Retrieves a list of all available kit names.
      Returns:
      a list of kit names
    • exists

      boolean exists(@NotNull @NotNull String name)
      Checks if a kit exists.
      Parameters:
      name - the name of the kit to check
      Returns:
      true if the kit exists, false otherwise
    • getKit

      @Nullable @Nullable Kit getKit(@NotNull @NotNull String name)
      Retrieves a raw Kit object.
      Parameters:
      name - the name of the kit
      Returns:
      the Kit object, or null if not found
    • cache

      void cache(@NotNull @NotNull String name, @NotNull @NotNull Kit kit)
      Caches a kit in memory.
      Parameters:
      name - the name of the kit
      kit - the kit object
    • save

      void save(@NotNull @NotNull String name, @NotNull @NotNull Kit kit)
      Saves a kit to storage.
      Parameters:
      name - the name of the kit
      kit - the kit object to save
    • getAllKits

      @Unmodifiable List<Kit> getAllKits()
      Retrieves all kits.
      Returns:
      an unmodifiable list of all kits
    • getAllEnabledKits

      @NotNull @NotNull @Unmodifiable List<Kit> getAllEnabledKits()
      Retrieves all enabled kits.
      Returns:
      an unmodifiable list of all enabled kits