Class ScalaPluginDescription
java.lang.Object
xyz.janboerman.scalaloader.plugin.ScalaPluginDescription
The Java API for configuring a
ScalaPlugin. This API is meant as a compile-time type-safe alternative to the error-prone plugin.yml files.
An instance of this class is used by ScalaPlugin(ScalaPluginDescription).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCommand(ScalaPluginDescription.Command command) addContributor(String contributor) addHardDepend(String dependency) addLoadBefore(String inverseDependency) addMavenDependency(String mavenDependency) Adds a maven dependency to the ScalaPlugin.addPermission(ScalaPluginDescription.Permission permission) addProvides(String pluginApi) addSoftDepend(String dependency) voidDeprecated.internal use onlybootstrapper(Class<?> bootstrapperClass) Set's the ScalaPlugin's bootstrapper.bootstrapper(String bootstrapperClassName) commands(ScalaPluginDescription.Command... commands) contributors(String... contributors) description(String pluginDescription) Class<?> getMain()Deprecated.internal use onlygetName()Deprecated.internal use onlyhardDepend(String... dependencies) booleanbooleanloadBefore(String... inverseDependencies) loadOrder(PluginLoadOrder loadOrder) mavenDependencies(String... mavenDependencies) Sets the maven dependencies of the ScalaPlugin.moveHardDependencyToSoftDependency(String dependency) openClassLoader(boolean openClassLoader) permissionDefault(PermissionDefault permissionDefault) permissions(ScalaPluginDescription.Permission... permissions) voidreadFromPluginYamlData(Map<String, Object> pluginYaml) voidsetApiVersion(String bukkitApiVersion) Deprecated.internal use onlysetFoliaSupported(boolean supportFolia) voidDeprecated.internal use onlyvoidsetScalaVersion(String scalaVersion) Deprecated.internal use onlysoftDepend(String... dependencies)
-
Constructor Details
-
ScalaPluginDescription
-
-
Method Details
-
setApiVersion
Deprecated.internal use only -
setMain
Deprecated.internal use only -
addYaml
Deprecated.internal use only -
setScalaVersion
Deprecated.internal use only -
getScalaVersion
Deprecated.internal use only -
foliaSupported
-
setFoliaSupported
-
isFoliaSupported
public boolean isFoliaSupported() -
getMain
Deprecated.internal use only -
getName
-
getVersion
-
getFullName
-
description
-
getDescription
-
authors
-
addAuthor
-
getAuthors
-
contributors
-
addContributor
-
getContributors
-
loadOrder
-
getLoadOrder
-
website
-
getWebsite
-
prefix
-
getPrefix
-
getApiVersion
-
hardDepend
-
addHardDepend
-
getHardDependencies
-
moveHardDependencyToSoftDependency
-
softDepend
-
addSoftDepend
-
getSoftDependencies
-
loadBefore
-
addLoadBefore
-
getInverseDependencies
-
provides
-
addProvides
-
getProvides
-
mavenDependencies
Sets the maven dependencies of the ScalaPlugin. This method only supports maven dependencies available on Maven Central.- Parameters:
mavenDependencies- the dependencies in GAV format, e.g. "com.example.foo:foo:1.0"- Returns:
- this ScalaPluginDescription
-
addMavenDependency
Adds a maven dependency to the ScalaPlugin. This method only supports maven dependencies available on Maven Central.- Parameters:
mavenDependency- the dependency in GAV format, e.g. "com.example.foo:foo:1.0"- Returns:
- this ScalaPluginDescription
-
getMavenDependencies
-
permissionDefault
-
getPermissionDefault
-
commands
-
addCommand
-
getCommands
-
permissions
-
addPermission
-
getPermissions
-
bootstrapper
-
bootstrapper
Set's the ScalaPlugin's bootstrapper. When running your ScalaPlugin on the Paper server software, this class will be used to boostrap your plugin.- Parameters:
bootstrapperClass- the bootstrap class. This class must implement io.papermc.paper.plugin.bootstrap.PluginBootstrap.- Returns:
- this ScalaPluginDescription
- See Also:
-
getBootstrapper
-
getBootstrapperName
-
hasOpenClassLoader
public boolean hasOpenClassLoader() -
openClassLoader
-
toPluginDescriptionFile
-
readFromPluginYamlData
-