Interface IScalaLoader
- All Superinterfaces:
CommandExecutor
,Plugin
,TabCompleter
,TabExecutor
- All Known Implementing Classes:
ScalaLoader
,ScalaLoader
Abstraction for ScalaLoader's main class.
-
Method Summary
Modifier and TypeMethodDescriptionInternal use onlyGet the EventBus used for registering and callingEvent
s.static IScalaLoader
Get the ScalaLoader instance.Collection
<? extends IScalaPlugin> Get the loaded ScalaPlugins.Get the folder from which ScalaPlugins are loaded.boolean
Get whether ScalaLoader is a Paper Plugindefault void
runInMainThread
(Runnable runnable) Deprecated.This method is only used by deprecated methods, and thus is no longer needed.default boolean
saveScalaVersionsToConfig
(PluginScalaVersion... versions) Add new versions of Scala to ScalaLoader's config.Methods inherited from interface org.bukkit.command.CommandExecutor
onCommand
Methods inherited from interface org.bukkit.plugin.Plugin
getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getLogger, getName, getPluginLoader, getResource, getServer, isEnabled, isNaggable, onDisable, onEnable, onLoad, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setNaggable
Methods inherited from interface org.bukkit.command.TabCompleter
onTabComplete
-
Method Details
-
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.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
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 callingEvent
s.- Returns:
- the event bus
-