Skip to content

API Usage

Luis Bazán edited this page Aug 21, 2023 · 7 revisions

Get all kits

KitsAPI.getKits(); // return a List<Kit>

Get specific kit

KitsAPI.getKit(kitName); // return a Kit object, can be null

Get kitsHelper

KitsHelper // It's the specific class for plugins that want to use the API in a formal way.

Register kit as Plugin

  • plugin - String or Plugin class.
  • kit - Kit class.
registerPluginKit(plugin, kit);

Get kit as Plugin

  • plugin - String or Plugin class.
  • name - String class.
  • It's nullable
getPluginKit(plugin, name);

Resolve kit as Plugin

  • plugin - String or Plugin class.
  • name - String class.
  • If the kit does not exist, create one.
resolvePluginKit(plugin, name);

Get Plugin Kits Manager

Kits.getKitManager(); // return a PluginKitsManager, It is a class to administer permanent kits to a player.

Set permanent Kit

  • 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()
setPermanentKit(player, kit);

Cancel permanent Kit

  • player - Player class.
cancelTrack(player);

Clone this wiki locally