ElitePets
  • Home
  • Frequently Asked Questions
  • Support
  • General Information
    • Creating Pets
      • Effects
      • Methods
    • Commands & Permissions
    • Giving Items
    • Developer API
    • Where to purchase?
Powered by GitBook
On this page
  • To create your own custom effects
  • Custom Plugin Events

Was this helpful?

  1. General Information

Developer API

The Developer API for ElitePets.

The API for ElitePets is very extensive and allows you to create your own effects very easily.

public class ElitePetsAPI {
 
    public HashMap<String, Pet> getPets();
 
    public void registerEffects(CustomEffect... customEffects);
 
    public boolean isPet(ItemStack itemStack);
 
    public Pet getPet(ItemStack itemStack);
 
    public int getLevel(ItemStack itemStack);
 
}

To create your own custom effects

Create a class that extends CustomEffect
Create the effect you want and set the name etc.

Register your custom effect using ElitePetsAPI.getPetAPI().registerEffects(
CustomEffect... customEffects);
ie. Test.class

Custom Plugin Events

PetLevelupEvent - Cancellable
Triggers when the pet levels up and activates the pets abilities

PetRemoveEvent
Triggers when pet is removed from players hotbar

CandyApplyEvent
Triggers when a rare candy is applied to a pet
PreviousGiving ItemsNextWhere to purchase?

Last updated 3 years ago

Was this helpful?