Class ScalaPlugin
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
xyz.janboerman.scalaloader.paper.plugin.ScalaPlugin
- All Implemented Interfaces:
CommandExecutor
,TabCompleter
,TabExecutor
,Plugin
,IScalaPlugin
Representation of a ScalaPlugin when running on Paper. ScalaLoader's bytecode transformer will ensure that subclasses of xyz.janboerman.scalaloader.plugin.ScalaPlugin
will be subclasses of xyz.janboerman.scalalaoder.paper.plugin.ScalaPlugin at runtime when ScalaLoader runs on Paper.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Use this super constructor if you have a plugin.yml or paper-plugin.yml.protected
ScalaPlugin
(ScalaPluginDescription description) Use this super constructor if you don't want to describe your plugin using a Yaml file. -
Method Summary
Modifier and TypeMethodDescriptionGet theClassLoader
of this plugin.Get the configuration file of this ScalaPlugin.final String
Get the api-version that was declared by this plugin.final String
Get the version of Scala declared by this plugin.Get the Server's event bus.Get the prefix of this plugin, used for logging.Get the version of Scala used by this plugin.Get thePluginLoader
of this plugin.toString()
Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onDisable, onEnable, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable
Methods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.bukkit.command.CommandExecutor
onCommand
Methods inherited from interface xyz.janboerman.scalaloader.compat.IScalaPlugin
getName, getScalaRelease
Methods inherited from interface org.bukkit.plugin.Plugin
getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getLogger, getPluginLoader, getResource, getServer, isEnabled, isNaggable, onDisable, onEnable, onLoad, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setNaggable
Methods inherited from interface org.bukkit.command.TabCompleter
onTabComplete
-
Constructor Details
-
ScalaPlugin
Use this super constructor if you don't want to describe your plugin using a Yaml file. You can *just* provide the description directly as an argument.- Parameters:
description
- your plugin's description
-
ScalaPlugin
protected ScalaPlugin()Use this super constructor if you have a plugin.yml or paper-plugin.yml.
-
-
Method Details
-
getPrefix
Get the prefix of this plugin, used for logging.- Specified by:
getPrefix
in interfaceIScalaPlugin
- Returns:
- the prefix
-
classLoader
Get theClassLoader
of this plugin.- Specified by:
classLoader
in interfaceIScalaPlugin
- Returns:
- the class loader
-
pluginLoader
Get thePluginLoader
of this plugin.- Specified by:
pluginLoader
in interfaceIScalaPlugin
- Returns:
- the plugin loader
-
getConfigFile
Get the configuration file of this ScalaPlugin.- Specified by:
getConfigFile
in interfaceIScalaPlugin
- Returns:
- the configuration file
-
getEventBus
Get the Server's event bus.- Specified by:
getEventBus
in interfaceIScalaPlugin
- Returns:
- the event bus
-
getScalaVersion
Get the version of Scala used by this plugin.- Specified by:
getScalaVersion
in interfaceIScalaPlugin
- Returns:
- the scala version
-
getDeclaredScalaVersion
Get the version of Scala declared by this plugin.- Specified by:
getDeclaredScalaVersion
in interfaceIScalaPlugin
- Returns:
- the declared scala version
-
getDeclaredApiVersion
Get the api-version that was declared by this plugin.- Returns:
- the bukkit api version
-
toString
- Overrides:
toString
in classJavaPlugin
-