Interface KitAPI
public interface KitAPI
-
Method Summary
Modifier and TypeMethodDescriptionvoidCaches a kit in memory.voidCreates a new kit based on the player's current inventory.voidDeletes a kit by name.booleanChecks if a kit exists.Retrieves all enabled kits.Retrieves all kits.@Nullable KitRetrieves a raw Kit object.voidGives a kit to the specified player.list()Retrieves a list of all available kit names.voidLoads a specific kit by name.voidloadAll()Loads all kits from storage.voidSaves a kit to storage.
-
Method Details
-
loadAll
void loadAll()Loads all kits from storage. -
load
Loads a specific kit by name.- Parameters:
name- the name of the kit to load
-
create
Creates a new kit based on the player's current inventory.- Parameters:
player- the player whose inventory will be used to create the kitname- the name of the new kit
-
give
Gives a kit to the specified player.- Parameters:
target- the player to receive the kitname- the name of the kit
-
delete
Deletes a kit by name.- Parameters:
player- the player executing the delete actionname- the name of the kit to delete
-
list
Retrieves a list of all available kit names.- Returns:
- a list of kit names
-
exists
Checks if a kit exists.- Parameters:
name- the name of the kit to check- Returns:
trueif the kit exists,falseotherwise
-
getKit
Retrieves a raw Kit object.- Parameters:
name- the name of the kit- Returns:
- the Kit object, or null if not found
-
cache
Caches a kit in memory.- Parameters:
name- the name of the kitkit- the kit object
-
save
Saves a kit to storage.- Parameters:
name- the name of the kitkit- the kit object to save
-
getAllKits
Retrieves all kits.- Returns:
- an unmodifiable list of all kits
-
getAllEnabledKits
Retrieves all enabled kits.- Returns:
- an unmodifiable list of all enabled kits
-