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
ConstructorsModifierConstructorDescriptionprotectedUse this super constructor if you have a plugin.yml or paper-plugin.yml.protectedScalaPlugin(ScalaPluginDescription description) Use this super constructor if you don't want to describe your plugin using a Yaml file. -
Method Summary
Modifier and TypeMethodDescriptionGet theClassLoaderof this plugin.Get the configuration file of this ScalaPlugin.final StringGet the api-version that was declared by this plugin.final StringGet 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 thePluginLoaderof 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, setNaggableMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bukkit.command.CommandExecutor
onCommandMethods inherited from interface xyz.janboerman.scalaloader.compat.IScalaPlugin
getName, getScalaReleaseMethods 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, setNaggableMethods 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:
getPrefixin interfaceIScalaPlugin- Returns:
- the prefix
-
classLoader
Get theClassLoaderof this plugin.- Specified by:
classLoaderin interfaceIScalaPlugin- Returns:
- the class loader
-
pluginLoader
Get thePluginLoaderof this plugin.- Specified by:
pluginLoaderin interfaceIScalaPlugin- Returns:
- the plugin loader
-
getConfigFile
Get the configuration file of this ScalaPlugin.- Specified by:
getConfigFilein interfaceIScalaPlugin- Returns:
- the configuration file
-
getEventBus
Get the Server's event bus.- Specified by:
getEventBusin interfaceIScalaPlugin- Returns:
- the event bus
-
getScalaVersion
Get the version of Scala used by this plugin.- Specified by:
getScalaVersionin interfaceIScalaPlugin- Returns:
- the scala version
-
getDeclaredScalaVersion
Get the version of Scala declared by this plugin.- Specified by:
getDeclaredScalaVersionin interfaceIScalaPlugin- Returns:
- the declared scala version
-
getDeclaredApiVersion
Get the api-version that was declared by this plugin.- Returns:
- the bukkit api version
-
toString
- Overrides:
toStringin classJavaPlugin
-