Interface BetterModelPlatform

All Superinterfaces:
ModelEventApplication

public interface BetterModelPlatform extends ModelEventApplication
Represents the main platform interface for BetterModel.
Since:
1.15.2
See Also:
  • Method Details

    • dataFolder

      @NotNull @NotNull File 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 File object.
      Since:
      2.0.0
    • jarType

      @NotNull @NotNull BetterModelPlatform.JarType jarType()
      Returns the type of JAR file this platform is running on (e.g., SPIGOT, PAPER, FABRIC).
      Returns:
      the BetterModelPlatform.JarType enum representing the platform's JAR type.
      Since:
      2.0.0
    • reload

      @NotNull default @NotNull BetterModelPlatform.ReloadResult 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

      @NotNull @NotNull BetterModelPlatform.ReloadResult reload(@NotNull @NotNull ReloadInfo info)
      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

      @NotNull @NotNull BetterModelConfig config()
      Returns the platform's configuration manager.
      Returns:
      the configuration
      Since:
      1.15.2
    • version

      @NotNull @NotNull MinecraftVersion version()
      Returns the Minecraft version of the running server.
      Returns:
      the Minecraft version
      Since:
      1.15.2
    • semver

      @NotNull @NotNull org.semver4j.Semver semver()
      Returns the semantic version of the platform.
      Returns:
      the semantic version
      Since:
      1.15.2
    • nms

      @NotNull @NotNull NMS nms()
      Returns the NMS (Net.Minecraft.Server) handler for version-specific operations.
      Returns:
      the NMS handler
      Since:
      1.15.2
    • modelManager

      @NotNull @NotNull ModelManager modelManager()
      Returns the model manager.
      Returns:
      the model manager
      Since:
      1.15.2
    • playerManager

      @NotNull @NotNull PlayerManager playerManager()
      Returns the player manager.
      Returns:
      the player manager
      Since:
      1.15.2
    • scriptManager

      @NotNull @NotNull ScriptManager scriptManager()
      Returns the script manager.
      Returns:
      the script manager
      Since:
      1.15.2
    • skinManager

      @NotNull @NotNull SkinManager skinManager()
      Returns the skin manager.
      Returns:
      the skin manager
      Since:
      1.15.2
    • profileManager

      @NotNull @NotNull ProfileManager profileManager()
      Returns the profile manager.
      Returns:
      the profile manager
      Since:
      1.15.2
    • scheduler

      @NotNull @NotNull ModelScheduler scheduler()
      Returns the platform's scheduler.
      Returns:
      the scheduler
      Since:
      1.15.2
    • adapter

      @NotNull @NotNull PlatformAdapter adapter()
      Return the platform's adapter
      Returns:
      the adapter
    • addReloadStartHandler

      void addReloadStartHandler(@NotNull @NotNull Consumer<PackZipper> consumer)
      Registers a handler to be executed when a reload starts.
      Parameters:
      consumer - the handler, receiving the PackZipper
      Since:
      1.15.2
    • addReloadEndHandler

      void addReloadEndHandler(@NotNull @NotNull Consumer<BetterModelPlatform.ReloadResult> consumer)
      Registers a handler to be executed when a reload ends.
      Parameters:
      consumer - the handler, receiving the BetterModelPlatform.ReloadResult
      Since:
      1.15.2
    • logger

      @NotNull @NotNull BetterModelLogger logger()
      Returns the platform's logger.
      Returns:
      the logger
      Since:
      1.15.2
    • evaluator

      @NotNull @NotNull BetterModelEvaluator evaluator()
      Returns the expression evaluator.
      Returns:
      the evaluator
      Since:
      1.15.2
    • eventBus

      @NotNull @NotNull BetterModelEventBus eventBus()
      Returns the event bus.
      Returns:
      the event bus
      Since:
      2.0.0
    • getResource

      @Nullable @Nullable InputStream getResource(@NotNull @NotNull String path)
      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