Interface ModelManager
- All Superinterfaces:
Manager
Manages all loaded models and provides access to them.
This manager is the primary entry point for retrieving ModelRenderer instances,
which are used to create and control model trackers.
- Since:
- 1.15.2
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleananimate(@NotNull PlatformPlayer player, @NotNull String model, @NotNull String animation) Plays an animation on a player.default booleananimate(@NotNull PlatformPlayer player, @NotNull String model, @NotNull String animation, @NotNull AnimationModifier modifier) Plays an animation on a player with a specific modifier.default booleananimate(@NotNull PlatformPlayer player, @NotNull String model, @NotNull String animation, @NotNull AnimationModifier modifier, @NotNull Consumer<EntityTracker> consumer) Plays an animation on a player with a modifier and a configuration consumer.@Nullable ModelRendererRetrieves a player limb renderer by its name.limbKeys()Returns a set of all loaded player limb model names.@NotNull @Unmodifiable Collection<ModelRenderer> limbs()Returns a collection of all renderers designated for player limb animations.@Nullable ModelRendererRetrieves a model renderer by its name.Returns a set of all loaded model names.@NotNull @Unmodifiable Collection<ModelRenderer> models()Returns a collection of all loaded model renderers.default @Nullable ModelRendererDeprecated.
-
Method Details
-
model
Retrieves a model renderer by its name.- Parameters:
name- the name of the model- Returns:
- the model renderer, or null if not found
- Since:
- 1.15.2
-
renderer
Deprecated.Usemodel(String)instead.- Parameters:
name- the name of the model- Returns:
- the model renderer, or null if not found
- Since:
- 1.15.2
-
models
Returns a collection of all loaded model renderers.- Returns:
- an unmodifiable collection of models
- Since:
- 1.15.2
-
modelKeys
-
limbs
Returns a collection of all renderers designated for player limb animations.- Returns:
- an unmodifiable collection of limb models
- Since:
- 1.15.2
-
limb
Retrieves a player limb renderer by its name.- Parameters:
name- the name of the limb model- Returns:
- the limb renderer, or null if not found
- Since:
- 1.15.2
-
limbKeys
-
animate
default boolean animate(@NotNull @NotNull PlatformPlayer player, @NotNull @NotNull String model, @NotNull @NotNull String animation) Plays an animation on a player.- Parameters:
player- the target playermodel- the name of the limb modelanimation- the name of the animation- Returns:
- true if the animation started successfully
- Since:
- 1.15.2
-
animate
default boolean animate(@NotNull @NotNull PlatformPlayer player, @NotNull @NotNull String model, @NotNull @NotNull String animation, @NotNull @NotNull AnimationModifier modifier) Plays an animation on a player with a specific modifier.- Parameters:
player- the target playermodel- the name of the limb modelanimation- the name of the animationmodifier- the animation modifier- Returns:
- true if the animation started successfully
- Since:
- 1.15.2
-
animate
default boolean animate(@NotNull @NotNull PlatformPlayer player, @NotNull @NotNull String model, @NotNull @NotNull String animation, @NotNull @NotNull AnimationModifier modifier, @NotNull @NotNull Consumer<EntityTracker> consumer) Plays an animation on a player with a modifier and a configuration consumer.- Parameters:
player- the target playermodel- the name of the limb modelanimation- the name of the animationmodifier- the animation modifierconsumer- a consumer to configure the created tracker- Returns:
- true if the animation started successfully
- Since:
- 1.15.2
-
model(String)instead.