-
Notifications
You must be signed in to change notification settings - Fork 0
API Usage
Luis Bazán edited this page Feb 2, 2024
·
7 revisions
KitsAPI.getKits(); // return a List<Kit>KitsAPI.getKit(kitName); // return a Kit object, can be nullKitsHelper // It's the specific class for plugins that want to use the API in a formal way.- plugin - String or Plugin class.
- kit - Kit class.
KitsHelper.registerPluginKit(plugin, kit);- player - Player
KitsHelper.createKitFromPlayer(player);- plugin - String or Plugin class.
- name - String class.
- It's nullable
KitsHelper.getPluginKit(plugin, name);- plugin - String or Plugin class.
- name - String class.
- If the kit does not exist, create one.
KitsHelper.resolvePluginKit(plugin, name);KitsHelper.getKitManager(your_plugin_instance); // return a PluginKitsManager, It is a class to administer permanent kits to a player.- player - Player class.
- kit - Kit class.
- If this method is called two or more times, it will only rewrite the kit. In case you want to leave the player use cancelTrack().
- The plugin will not stop trying to put the Kit to the player even if he disconnects, the only way is to use cancelTrack()
pluginKitsManager.setPermanentKit(player, kit);- player - Player class.
pluginKitsManager.cancelTrack(player);