You can download the plugin on Modrinth.
/totemanimation <player> <custom_model_data>
command allows you to display totem animation with provided CustomModelData to specified player. Obviously, that player has to have resource pack with CustomModelData totems enabled.
Plugin can be used as an API
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.YouHaveTrouble</groupId>
<artifactId>TotemAnimations</artifactId>
<version>VERSION</version>
</dependency>
TotemAnimations.playTotemAnimation(Player player, int customModelData);