Interface BetterModelPlugin

All Superinterfaces:
org.bukkit.command.CommandExecutor, io.papermc.paper.plugin.lifecycle.event.LifecycleEventOwner, net.kyori.adventure.key.Namespaced, org.bukkit.plugin.Plugin, org.bukkit.command.TabCompleter, org.bukkit.command.TabExecutor

public interface BetterModelPlugin extends org.bukkit.plugin.Plugin
Represents the main plugin interface for BetterModel.

This interface extends Plugin and provides access to core managers, configuration, versioning, and reloading functionality. It serves as the central hub for the plugin's operations.

Since:
1.15.2
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Represents the outcome of a plugin reload operation.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Registers a handler to be executed when a reload ends.
    void
    Registers a handler to be executed when a reload starts.
    Returns the plugin's configuration manager.
    Returns the expression evaluator.
    @Nullable InputStream
    getResource(@NotNull String path)
    Retrieves a resource from the plugin's JAR file.
    boolean
    Checks if the running version of BetterModel is a snapshot build.
    Returns the plugin's logger.
    @NotNull ModelManager
    Returns the model manager.
    @NotNull NMS
    nms()
    Returns the NMS (Net.Minecraft.Server) handler for version-specific operations.
    @NotNull PlayerManager
    Returns the player manager.
    Returns the profile manager.
    Reloads the plugin with default settings (console sender).
    reload(@NotNull ReloadInfo info)
    Reloads the plugin with specific reload information.
    reload(@NotNull org.bukkit.command.CommandSender sender)
    Reloads the plugin, specifying the command sender who initiated it.
    Returns the plugin's scheduler.
    @NotNull ScriptManager
    Returns the script manager.
    @NotNull com.vdurmont.semver4j.Semver
    Returns the semantic version of the plugin.
    @NotNull SkinManager
    Returns the skin manager.
    Returns the Minecraft version of the running server.

    Methods inherited from interface org.bukkit.command.CommandExecutor

    onCommand

    Methods inherited from interface net.kyori.adventure.key.Namespaced

    namespace

    Methods inherited from interface org.bukkit.plugin.Plugin

    getComponentLogger, getConfig, getDataFolder, getDataPath, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getLifecycleManager, getLog4JLogger, getLogger, getName, getPluginLoader, getPluginMeta, getServer, getSLF4JLogger, isEnabled, isNaggable, onDisable, onEnable, onLoad, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setNaggable

    Methods inherited from interface org.bukkit.command.TabCompleter

    onTabComplete
  • Method Details

    • reload

      @NotNull default @NotNull BetterModelPlugin.ReloadResult reload()
      Reloads the plugin with default settings (console sender).
      Returns:
      the result of the reload operation
      Since:
      1.15.2
    • reload

      @NotNull default @NotNull BetterModelPlugin.ReloadResult reload(@NotNull @NotNull org.bukkit.command.CommandSender sender)
      Reloads the plugin, 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 BetterModelPlugin.ReloadResult reload(@NotNull @NotNull ReloadInfo info)
      Reloads the plugin 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 plugin'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 com.vdurmont.semver4j.Semver semver()
      Returns the semantic version of the plugin.
      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 plugin's scheduler.
      Returns:
      the scheduler
      Since:
      1.15.2
    • 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<BetterModelPlugin.ReloadResult> consumer)
      Registers a handler to be executed when a reload ends.
      Parameters:
      consumer - the handler, receiving the BetterModelPlugin.ReloadResult
      Since:
      1.15.2
    • logger

      @NotNull @NotNull BetterModelLogger logger()
      Returns the plugin'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
    • getResource

      @Nullable @Nullable InputStream getResource(@NotNull @NotNull String path)
      Retrieves a resource from the plugin's JAR file.
      Specified by:
      getResource in interface org.bukkit.plugin.Plugin
      Parameters:
      path - the path to the resource
      Returns:
      an input stream for the resource, or null if not found
      Since:
      1.15.2