From 65ac7b451d52fed4e1a2ef6088659c78ab1eaace Mon Sep 17 00:00:00 2001 From: Bishop Date: Fri, 31 Jul 2026 21:08:45 -0500 Subject: [PATCH] !2503 functions --- Server/src/main/core/api/ContentAPI.kt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Server/src/main/core/api/ContentAPI.kt b/Server/src/main/core/api/ContentAPI.kt index 7423518a7..d1c3a40ef 100644 --- a/Server/src/main/core/api/ContentAPI.kt +++ b/Server/src/main/core/api/ContentAPI.kt @@ -586,6 +586,26 @@ fun resetAnimator(player: Player) { player.animator.animate(Animation(-1, Animator.Priority.VERY_HIGH)) } +/** + * Sets a player's render animation to a given animation. + * @param player the player whose render animation to set + * @param animation the ID of the render animation to set + */ +fun renderAnimation(player: Player, animation: Int) { + player.appearance.setAnimations(Animation(animation)) + player.appearance.sync() +} + +/** + * Resets a player's render animation to the default. + * @param player the player whose render animation to reset + */ +fun resetRenderAnimation(player: Player) { + player.appearance.setDefaultAnimations() + player.appearance.setAnimations() + player.appearance.sync() +} + /** * Get the number of ticks an animation lasts * @param animation the Animation object to check the duration of