You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Get player's active petOptional<Pet> activePet = PetAPI.getActivePet(player);
// Get all player's petsSet<Pet> pets = PetAPI.getPlayerPets(player);
// Activate a petbooleansuccess = PetAPI.activatePet(player, pet);
// Deactivate current petbooleandeactivated = PetAPI.deactivatePet(player);
// Give pet to playerPetnewPet = PetAPI.givePet(player, "golden_dragon_epic");
// Check if player owns petbooleanowns = PetAPI.hasPlayerPet(player, pet);
Experience System
// Add experience to active petPetAPI.addPetExperience(player, 100, XPSource.COMBAT);
// Get exp needed for next levelintexpNeeded = PetAPI.getExpRequiredForNextLevel(pet);
// Get level progress (0.0 to 1.0)doubleprogress = PetAPI.getLevelProgress(pet);
// Check if max levelbooleanisMax = PetAPI.isMaxLevel(pet);
Pet Items & Customization
// Apply item to petbooleanapplied = PetAPI.applyPetItem(player, pet, item);
// Remove pet itemPetItemremoved = PetAPI.removePetItem(player, pet);
// Apply skin to petbooleanskinApplied = PetAPI.applySkinToPet(player, pet, skin);
// Get equipped itemOptional<PetItem> item = PetAPI.getPetItem(pet);
XP Sharing
// Get shared petsSet<Pet> sharedPets = PetAPI.getSharedPets(player);
// Add to XP sharing (max 4)booleanadded = PetAPI.addPetToXPShare(player, pet);
// Remove from XP sharingbooleanremoved = PetAPI.removePetFromXPShare(player, pet);
// Check if at maxbooleanatMax = PetAPI.hasMaxSharedPets(player);
Filtering & Searching
// Get pets by rarityList<Pet> legendary = PetAPI.getPetsByRarity(player, Rarity.LEGENDARY);
// Get pets by typeList<Pet> combat = PetAPI.getPetsByType(player, PetType.COMBAT);
// Find pet by UUIDOptional<Pet> pet = PetAPI.getPetByUUID(player, petUUID);
// Get total pet countinttotal = PetAPI.getTotalPetCount(player);
Configuration Access
// Get pet templateOptional<Pet> template = PetAPI.getPetTemplate("golden_dragon_epic");
// Get all templatesMap<String, Pet> all = PetAPI.getAllPetTemplates();
Async Operations
// Load player data asyncCompletableFuture<Optional<PlayerData>> future = PetAPI.loadPlayerDataAsync(player);
// Save player data asyncCompletableFuture<Void> save = PetAPI.savePlayerDataAsync(player);