Interface IScalaLoader

All Superinterfaces:
CommandExecutor, Plugin, TabCompleter, TabExecutor
All Known Implementing Classes:
ScalaLoader, ScalaLoader

public interface IScalaLoader extends Plugin
Abstraction for ScalaLoader's main class.
  • Method Details

    • getInstance

      static IScalaLoader getInstance()
      Get the ScalaLoader instance.
      Returns:
      the instance
    • isPaperPlugin

      boolean isPaperPlugin()
      Get whether ScalaLoader is a Paper Plugin
      Returns:
      true if ScalaLoader is a Paper Plugin, false if it is a regular Bukkit plugin.
      See Also:
    • getDebugSettings

      DebugSettings getDebugSettings()
      Internal use only
    • getScalaPluginsFolder

      File getScalaPluginsFolder()
      Get the folder from which ScalaPlugins are loaded. By default this is server_root/plugins/ScalaLoader/scalaplugins
      Returns:
      the folder from which ScalaPlugins are loaded
    • runInMainThread

      @Deprecated default void runInMainThread(Runnable runnable)
      Deprecated.
      This method is only used by deprecated methods, and thus is no longer needed. Should you need equivalent functionality, then use the following snippet:
                       
                           if (Bukkit.isPrimaryThread()) {
                               runnable.run();
                           } else {
                               Bukkit.getScheduler().runTask(scalaLoader, runnable);
                           }
                       
                   
      Runs a task on the server's main thread.
      Parameters:
      runnable - the task to run on the main thread
    • getScalaPlugins

      Collection<? extends IScalaPlugin> getScalaPlugins()
      Get the loaded ScalaPlugins.
      Returns:
      the loaded ScalaPlugins.
    • saveScalaVersionsToConfig

      default boolean saveScalaVersionsToConfig(PluginScalaVersion... versions)
      Add new versions of Scala to ScalaLoader's config.
      Parameters:
      versions - the scala versions
      Returns:
      whether a new version was added to the config
    • getEventBus

      EventBus getEventBus()
      Get the EventBus used for registering and calling Events.
      Returns:
      the event bus