Emotecraft (Fabric)

Emotecraft (Fabric)

4M Downloads

How to play emote from plugin

justlofe opened this issue ยท 4 comments

commented

I was trying to figure out how the plugin works on Bukkit, namely the processing of emotions. I need to be able to send an emotion to the player using the plugin, as if he turned it on himself. Is there such a method or is it possible to send an emotion just in a package, if so, how?

commented

You can use ServerEmotesAPI.playEmote(UUID playerID, KeyframeAnimation emote, bool forcePlay) to play a specific emote on a specific player.
You can fetch the server-side emotes using getLodadedEmotes() and .get from that map using emote ID or deserializeEmote to read a json or binary emote file.

This API will handle a proper emote play, everyone seeing the player will receive the command (including the player itself)

commented

@KosmX Is it possible to use emote on org.bukkit.Entity#NPC?

commented
commented

You can't play emotes on non-player entities, fake players should work, but I haven't tested those