EchoPet

EchoPet

882k Downloads

EchoPet API

dniym opened this issue ยท 2 comments

commented

I have an issue with the EchoPet API.
I am using the API to get a players current pet, then trying to artificially kill it / make it explode.

final IPet pet = ep.getPet(player) // Returns users pet

after the event that would kill the pet fires I use:
pet.removePet(false);

This does remove the pet visibly from the game... However it seems the pet is still there in memory as if I spawn a new pet i can hear the old pet die.

Also any further calls to getPet(player) will return the old pet until a new one is spawned.
Am I going about removing the pet wrong? it seems that removePet seems to just remove it from being visible otherwise after a removePet shouldnt getPet() return null?

Edit: Also is there a way to remove a pet's owner / abandon it wherever it stands? or otherwise prevent it from teleporting back to the player? If I launch a pet away from the player it just boomerangs back!
Thank you!

commented

Use api.removePet(...) instead :)

commented

Thanks so much! That worked perfectly!