BetterModel

The main entry point for the BetterModel API.

This class provides static access to the platform instance, configuration, model managers, NMS handlers, and entity registries. It serves as a service provider for interacting with the BetterModel engine.

Since

1.15.2

Functions

Link copied to clipboard
@NotNull
open fun config(): @NotNull BetterModelConfig
Returns the platform configuration manager.
Link copied to clipboard
@NotNull
open fun eventBus(): @NotNull BetterModelEventBus
Returns the event bus.
Link copied to clipboard
@NotNull
open fun limb(@NotNull name: @NotNull String): @NotNull Optional<ModelRenderer>
Retrieves a player limb renderer by its name, wrapped in an Optional.
Link copied to clipboard
@NotNull
@Unmodifiable
open fun limbKeys(): @NotNull @Unmodifiable Set<String>
Returns a set of all loaded player limb model names.
Link copied to clipboard
@Nullable
open fun limbOrNull(@NotNull name: @NotNull String): @Nullable ModelRenderer
Retrieves a player limb renderer by its name, or null if not found.
Link copied to clipboard
@NotNull
@Unmodifiable
open fun limbs(): @NotNull @Unmodifiable Collection<ModelRenderer>
Returns a collection of all loaded player limb renderers.
Link copied to clipboard
@NotNull
open fun model(@NotNull name: @NotNull String): @NotNull Optional<ModelRenderer>
Retrieves a model renderer by its name, wrapped in an Optional.
Link copied to clipboard
@NotNull
@Unmodifiable
open fun modelKeys(): @NotNull @Unmodifiable Set<String>
Returns a set of all loaded model names.
Link copied to clipboard
@Nullable
open fun modelOrNull(@NotNull name: @NotNull String): @Nullable ModelRenderer
Retrieves a model renderer by its name, or null if not found.
Link copied to clipboard
@NotNull
@Unmodifiable
open fun models(): @NotNull @Unmodifiable Collection<ModelRenderer>
Returns a collection of all loaded model renderers.
Link copied to clipboard
@NotNull
open fun nms(): @NotNull NMS
Returns the NMS handler instance.
Link copied to clipboard
@NotNull
open fun platform(): @NotNull BetterModelPlatform
Returns the singleton instance of the BetterModel platform.
Link copied to clipboard
@NotNull
open fun player(@NotNull uuid: @NotNull UUID): @NotNull Optional<PlayerChannelHandler>
Retrieves a player channel handler by the player's UUID.
Link copied to clipboard
@ApiStatus.Internal
open fun register(@NotNull instance: @NotNull BetterModelPlatform)
Registers the platform instance.
Link copied to clipboard
@NotNull
open fun registry(@NotNull uuid: @NotNull UUID): @NotNull Optional<EntityTrackerRegistry>
Retrieves an entity tracker registry by the entity's UUID.
@NotNull
open fun registry(@NotNull entity: @NotNull BaseEntity): @NotNull Optional<EntityTrackerRegistry>
Retrieves an entity tracker registry for a base entity.
@NotNull
open fun registry(@NotNull entity: @NotNull PlatformEntity): @NotNull Optional<EntityTrackerRegistry>
Retrieves an entity tracker registry for a Bukkit entity.
Link copied to clipboard
@Nullable
open fun registryOrNull(@NotNull uuid: @NotNull UUID): @Nullable EntityTrackerRegistry
Retrieves an entity tracker registry by the entity's UUID, or null if not found.
@Nullable
open fun registryOrNull(@NotNull entity: @NotNull BaseEntity): @Nullable EntityTrackerRegistry
Retrieves an entity tracker registry for a base entity, or null if not found.
@Nullable
open fun registryOrNull(@NotNull entity: @NotNull PlatformEntity): @Nullable EntityTrackerRegistry
Retrieves an entity tracker registry for a Bukkit entity, or null if not found.