Interface ModelManager


public interface ModelManager
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 Details

    • model

      @Nullable @Nullable ModelRenderer model(@NotNull @NotNull String name)
      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 @Nullable default @Nullable ModelRenderer renderer(@NotNull @NotNull String name)
      Deprecated.
      Use model(String) instead.
      Parameters:
      name - the name of the model
      Returns:
      the model renderer, or null if not found
      Since:
      1.15.2
    • models

      @NotNull @NotNull @Unmodifiable Collection<ModelRenderer> models()
      Returns a collection of all loaded model renderers.
      Returns:
      an unmodifiable collection of models
      Since:
      1.15.2
    • modelKeys

      @NotNull @NotNull @Unmodifiable Set<String> modelKeys()
      Returns a set of all loaded model names.
      Returns:
      an unmodifiable set of model keys
      Since:
      1.15.2
    • limbs

      @NotNull @NotNull @Unmodifiable Collection<ModelRenderer> limbs()
      Returns a collection of all renderers designated for player limb animations.
      Returns:
      an unmodifiable collection of limb models
      Since:
      1.15.2
    • limb

      @Nullable @Nullable ModelRenderer limb(@NotNull @NotNull String name)
      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

      @NotNull @NotNull @Unmodifiable Set<String> limbKeys()
      Returns a set of all loaded player limb model names.
      Returns:
      an unmodifiable set of limb keys
      Since:
      1.15.2
    • 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 player
      model - the name of the limb model
      animation - 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 player
      model - the name of the limb model
      animation - the name of the animation
      modifier - 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 player
      model - the name of the limb model
      animation - the name of the animation
      modifier - the animation modifier
      consumer - a consumer to configure the created tracker
      Returns:
      true if the animation started successfully
      Since:
      1.15.2