Interface KitAPI
public interface KitAPI
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Caches a kit in memory.void
Creates a new kit based on the player's current inventory.void
Deletes a kit by name.boolean
Checks if a kit exists.Retrieves all enabled kits.Retrieves all kits.@Nullable Kit
Retrieves a raw Kit object.void
Gives a kit to the specified player.list()
Retrieves a list of all available kit names.void
Loads a specific kit by name.void
loadAll()
Loads all kits from storage.void
Saves 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:
true
if the kit exists,false
otherwise
-
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
-