BetterModel

The main entry point for the BetterModel API.

This class provides static access to the plugin 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

Properties

Link copied to clipboard
Checks if the server is running on the Folia platform.
Link copied to clipboard
Checks if the server is running on the Paper platform (or a fork like Purpur/Folia).
Link copied to clipboard
Checks if the server is running on the Purpur platform.

Functions

Link copied to clipboard
@NotNull
open fun config(): @NotNull BetterModelConfig
Returns the plugin configuration manager.
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 player(@NotNull uuid: @NotNull UUID): @NotNull Optional<PlayerChannelHandler>
Retrieves a player channel handler by the player's UUID.
Link copied to clipboard
@NotNull
open fun plugin(): @NotNull BetterModelPlugin
Returns the singleton instance of the BetterModel plugin.
Link copied to clipboard
@ApiStatus.Internal
open fun register(@NotNull instance: @NotNull BetterModelPlugin)
Registers the plugin 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 Entity): @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 Entity): @Nullable EntityTrackerRegistry
Retrieves an entity tracker registry for a Bukkit entity, or null if not found.