API

Developer API

First off, you will need to add the GhostSquadron plugin to your build path. Once you have that done, create a new class and make it extend Kit.

public class MyKit extends Kit {
  
}

Then you will need to add the constructor.

public class MyKit extends Kit {
  public MyKit(){
    super("My Kit", new ItemStack(Material.STICK));
  }
}

Note: The second parameter in the constructor is the icon for the kit. It will be showed on the kit selection menu. After you have the constructor, you will need to override the applyKit(Player player) method and the getDescription() method.

public class MyKit extends Kit {
  public MyKit(){
    super("My Kit", new ItemStack(Material.STICK));
  }

  @Override
  public void applyKit(Player player){
    //This is where you will add items to the player's inventory
    //Note: You can easily clear the player's inventory by using PlayerUtils.wipe(player).
  }

  @Override
  public String[] getDescription(){
    return new String[]{
        "This is the kit's",
        "description."
    };
  }
}

Don't forget to register the kit! Add this in the onEnable():

KitUtils.registerKit(new MyKit());

Comments

Posts Quoted:
Reply
Clear All Quotes