Package kr.toxicity.model.api
Interface BetterModelPlatform
- All Superinterfaces:
ModelEventApplication
Represents the main platform interface for BetterModel.
- Since:
- 1.15.2
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumRepresents the type of JAR file the platform is running on.static interfaceRepresents the outcome of a platform reload operation. -
Method Summary
Modifier and TypeMethodDescription@NotNull PlatformAdapteradapter()Return the platform's adaptervoidaddReloadEndHandler(@NotNull Consumer<BetterModelPlatform.ReloadResult> consumer) Registers a handler to be executed when a reload ends.voidaddReloadStartHandler(@NotNull Consumer<PackZipper> consumer) Registers a handler to be executed when a reload starts.@NotNull BetterModelConfigconfig()Returns the platform's configuration manager.@NotNull FileReturns the data folder for the BetterModel plugin.@NotNull BetterModelEvaluatorReturns the expression evaluator.@NotNull BetterModelEventBuseventBus()Returns the event bus.@Nullable InputStreamgetResource(@NotNull String path) Retrieves a resource from the platform's JAR file.booleanChecks if the running version of BetterModel is a snapshot build.@NotNull BetterModelPlatform.JarTypejarType()Returns the type of JAR file this platform is running on (e.g., SPIGOT, PAPER, FABRIC).@NotNull BetterModelLoggerlogger()Returns the platform's logger.@NotNull ModelManagerReturns the model manager.@NotNull NMSnms()Returns the NMS (Net.Minecraft.Server) handler for version-specific operations.@NotNull PlayerManagerReturns the player manager.@NotNull ProfileManagerReturns the profile manager.default @NotNull BetterModelPlatform.ReloadResultreload()Reloads the platform with default settings (console sender).@NotNull BetterModelPlatform.ReloadResultreload(@NotNull ReloadInfo info) Reloads the platform with specific reload information.default @NotNull BetterModelPlatform.ReloadResultreload(@NotNull net.kyori.adventure.audience.Audience sender) Reloads the platform, specifying the command sender who initiated it.@NotNull ModelSchedulerReturns the platform's scheduler.@NotNull ScriptManagerReturns the script manager.@NotNull com.vdurmont.semver4j.Semversemver()Returns the semantic version of the platform.@NotNull SkinManagerReturns the skin manager.@NotNull MinecraftVersionversion()Returns the Minecraft version of the running server.Methods inherited from interface kr.toxicity.model.api.event.ModelEventApplication
isEnabled
-
Method Details
-
dataFolder
Returns the data folder for the BetterModel plugin. This is where configuration files, data files, and other plugin-specific resources are stored.- Returns:
- the data folder as a
Fileobject. - Since:
- 2.0.0
-
jarType
Returns the type of JAR file this platform is running on (e.g., SPIGOT, PAPER, FABRIC).- Returns:
- the
BetterModelPlatform.JarTypeenum representing the platform's JAR type. - Since:
- 2.0.0
-
reload
Reloads the platform with default settings (console sender).- Returns:
- the result of the reload operation
- Since:
- 2.0.0
-
reload
@NotNull default @NotNull BetterModelPlatform.ReloadResult reload(@NotNull @NotNull net.kyori.adventure.audience.Audience sender) Reloads the platform, specifying the command sender who initiated it.- Parameters:
sender- the command sender- Returns:
- the result of the reload operation
- Since:
- 1.15.2
-
reload
Reloads the platform with specific reload information.- Parameters:
info- the reload configuration- Returns:
- the result of the reload operation
- Since:
- 1.15.2
-
isSnapshot
boolean isSnapshot()Checks if the running version of BetterModel is a snapshot build.- Returns:
- true if snapshot, false otherwise
- Since:
- 1.15.2
-
config
Returns the platform's configuration manager.- Returns:
- the configuration
- Since:
- 1.15.2
-
version
Returns the Minecraft version of the running server.- Returns:
- the Minecraft version
- Since:
- 1.15.2
-
semver
@NotNull @NotNull com.vdurmont.semver4j.Semver semver()Returns the semantic version of the platform.- Returns:
- the semantic version
- Since:
- 1.15.2
-
nms
Returns the NMS (Net.Minecraft.Server) handler for version-specific operations.- Returns:
- the NMS handler
- Since:
- 1.15.2
-
modelManager
Returns the model manager.- Returns:
- the model manager
- Since:
- 1.15.2
-
playerManager
Returns the player manager.- Returns:
- the player manager
- Since:
- 1.15.2
-
scriptManager
Returns the script manager.- Returns:
- the script manager
- Since:
- 1.15.2
-
skinManager
Returns the skin manager.- Returns:
- the skin manager
- Since:
- 1.15.2
-
profileManager
Returns the profile manager.- Returns:
- the profile manager
- Since:
- 1.15.2
-
scheduler
Returns the platform's scheduler.- Returns:
- the scheduler
- Since:
- 1.15.2
-
adapter
Return the platform's adapter- Returns:
- the adapter
-
addReloadStartHandler
Registers a handler to be executed when a reload starts.- Parameters:
consumer- the handler, receiving thePackZipper- Since:
- 1.15.2
-
addReloadEndHandler
Registers a handler to be executed when a reload ends.- Parameters:
consumer- the handler, receiving theBetterModelPlatform.ReloadResult- Since:
- 1.15.2
-
logger
Returns the platform's logger.- Returns:
- the logger
- Since:
- 1.15.2
-
evaluator
Returns the expression evaluator.- Returns:
- the evaluator
- Since:
- 1.15.2
-
eventBus
Returns the event bus.- Returns:
- the event bus
- Since:
- 2.0.0
-
getResource
Retrieves a resource from the platform's JAR file.- Parameters:
path- the path to the resource- Returns:
- an input stream for the resource, or null if not found
- Since:
- 1.15.2
-