ApiPlugins

class ApiPlugins(tomlParser: TomlParser, apiProperties: ApiProperties, versionMeta: VersionMeta, utilities: Utilities) : JarPluginManager

Manager for ServerPackCreator plugins. In itself it doesn't do much. It gathers lists of all available extensions for TabExtension,PreGenExtension,PreZipExtension and PostGenExtension so they can then be run during server pack generation and during initialization of the GUI.

Author

Griefed

Parameters

tomlParser

To read plugin-configurations, so they can be provided to extensions.

apiProperties

ServerPackCreator settings to be provided to extensions.

versionMeta

Version meta to be provided to extensions.

utilities

Utilities to be provided to extensions.

Constructors

Link copied to clipboard
constructor(tomlParser: TomlParser, apiProperties: ApiProperties, versionMeta: VersionMeta, utilities: Utilities)

Properties

Link copied to clipboard
protected var dependencyResolver: DependencyResolver
Link copied to clipboard
Link copied to clipboard
protected var extensionFactory: ExtensionFactory
Link copied to clipboard
protected var extensionFinder: ExtensionFinder
Link copied to clipboard
Link copied to clipboard
protected var pluginDescriptorFinder: PluginDescriptorFinder
Link copied to clipboard
protected var pluginFactory: PluginFactory
Link copied to clipboard
protected var pluginLoader: PluginLoader
Link copied to clipboard
protected var pluginRepository: PluginRepository
Link copied to clipboard
protected var plugins: MutableMap<String, PluginWrapper>
Link copied to clipboard
protected val pluginsRoots: MutableList<Path>
Link copied to clipboard
protected var pluginStateListeners: MutableList<PluginStateListener>
Link copied to clipboard
protected var pluginStatusProvider: PluginStatusProvider
Link copied to clipboard
protected var resolvedPlugins: MutableList<PluginWrapper>
Link copied to clipboard
protected var resolveRecoveryStrategy: AbstractPluginManager.ResolveRecoveryStrategy
Link copied to clipboard
protected var runtimeMode: RuntimeMode
Link copied to clipboard
protected var startedPlugins: MutableList<PluginWrapper>
Link copied to clipboard
protected var systemVersion: String
Link copied to clipboard
protected var unresolvedPlugins: MutableList<PluginWrapper>
Link copied to clipboard
protected var versionManager: VersionManager

Functions

Link copied to clipboard
open override fun addPluginStateListener(p0: PluginStateListener)
Link copied to clipboard

Add any and all additional tabs to the ServerPackCreator tabbed pane (main GUI). You may use this to add tabs to your own JTabbedPane, if you so desire. Could be pretty awesome to have your plugins extra tabs in a separate window!

Link copied to clipboard
protected open fun checkPluginId(p0: String)
Link copied to clipboard
protected open fun checkPluginState(p0: String, p1: PluginState): Boolean
Link copied to clipboard
protected open override fun createExtensionFactory(): ExtensionFactory
Link copied to clipboard
protected open override fun createExtensionFinder(): ExtensionFinder
Link copied to clipboard
protected open override fun createPluginDescriptorFinder(): PluginDescriptorFinder
Link copied to clipboard
protected open override fun createPluginFactory(): PluginFactory
Link copied to clipboard
protected open override fun createPluginLoader(): PluginLoader
Link copied to clipboard
protected open override fun createPluginRepository(): PluginRepository
Link copied to clipboard
protected open fun createPluginsRoot(): MutableList<Path>
Link copied to clipboard
protected open override fun createPluginStatusProvider(): PluginStatusProvider
Link copied to clipboard
protected open fun createPluginWrapper(p0: PluginDescriptor, p1: Path, p2: ClassLoader): PluginWrapper
Link copied to clipboard
protected open override fun createVersionManager(): VersionManager
Link copied to clipboard
open override fun deletePlugin(p0: String): Boolean
Link copied to clipboard
open override fun disablePlugin(p0: String): Boolean
Link copied to clipboard
open override fun enablePlugin(p0: String): Boolean
Link copied to clipboard
protected open fun firePluginStateEvent(p0: PluginStateEvent)
Link copied to clipboard
fun <T> getAllExtensionsOfPlugin(plugin: PluginWrapper, type: Class<T>): List<T>

Get all extension of the specified type for the specified plugin.

Link copied to clipboard

Create config panels for the passed server pack configuration tab. Note that this method does NOT add the panels to the tab, it only creates them and passes the server pack config tab object-reference to each config panel, so they, in turn, may use any available fields and methods for their own operations. A given server pack config tab needs to add the panels which are returned by this method, so a user may make their configurations accordingly.

Link copied to clipboard
open override fun <T : Any> getExtensionClasses(p0: Class<T>): MutableList<Class<out T>>
open override fun getExtensionClasses(p0: String): MutableList<Class<*>>
protected open fun <T : Any> getExtensionClasses(p0: MutableList<ExtensionWrapper<T>>): MutableList<Class<out T>>
open override fun <T : Any> getExtensionClasses(p0: Class<T>, p1: String): MutableList<Class<out T>>
Link copied to clipboard
Link copied to clipboard
open override fun getExtensionFactory(): ExtensionFactory
Link copied to clipboard
open override fun <T : Any> getExtensions(p0: Class<T>): MutableList<T>
open override fun getExtensions(p0: String): MutableList<Any?>
protected open fun <T : Any> getExtensions(p0: MutableList<ExtensionWrapper<T>>): MutableList<T>
open override fun <T : Any> getExtensions(p0: Class<T>, p1: String): MutableList<T>
Link copied to clipboard
open override fun getPlugin(p0: String): PluginWrapper
Link copied to clipboard
open override fun getPluginClassLoader(p0: String): ClassLoader
Link copied to clipboard
Link copied to clipboard
fun getPluginConfig(pluginId: String): Optional<CommentedConfig>

Get the global plugin configuration for an plugin of the passed ID. The configuration is wrapped in an Optional, because an plugin may not provide a global configuration. If you intend on using a global configuration for your plugin, make sure to check whether it is present before trying to use it!

Link copied to clipboard

Get the configuration-file for a plugin, if it exists. This is wrapped in an Optional, because not every plugin may provide a configuration-file to use globally for the relevant plugins settings. If you intend on using a global configuration, make sure to check whether the file is present, before moving on!

Link copied to clipboard
protected open fun getPluginDescriptorFinder(): PluginDescriptorFinder
Link copied to clipboard
protected open fun getPluginFactory(): PluginFactory
Link copied to clipboard
protected open fun getPluginLabel(p0: String): String
protected open fun getPluginLabel(p0: PluginDescriptor): String
Link copied to clipboard
open fun getPluginLoader(): PluginLoader
Link copied to clipboard
open override fun getPlugins(): MutableList<PluginWrapper>
open override fun getPlugins(p0: PluginState): MutableList<PluginWrapper>
Link copied to clipboard
open override fun getPluginsRoot(): Path
Link copied to clipboard
open override fun getPluginsRoots(): MutableList<Path>
Link copied to clipboard
open override fun getResolvedPlugins(): MutableList<PluginWrapper>
Link copied to clipboard
protected fun getResolveRecoveryStrategy(): AbstractPluginManager.ResolveRecoveryStrategy
Link copied to clipboard
open override fun getRuntimeMode(): RuntimeMode
Link copied to clipboard
open override fun getStartedPlugins(): MutableList<PluginWrapper>
Link copied to clipboard
open override fun getSystemVersion(): String
Link copied to clipboard
open override fun getUnresolvedPlugins(): MutableList<PluginWrapper>
Link copied to clipboard
open fun getVersion(): String
Link copied to clipboard
open override fun getVersionManager(): VersionManager
Link copied to clipboard
protected open fun idForPath(p0: Path): String
Link copied to clipboard
protected open override fun initialize()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected open fun isPluginDisabled(p0: String): Boolean
Link copied to clipboard
protected open fun isPluginValid(p0: PluginWrapper): Boolean
Link copied to clipboard
open override fun loadPlugin(p0: Path): String
Link copied to clipboard
protected open override fun loadPluginFromPath(p0: Path): PluginWrapper
Link copied to clipboard
open override fun loadPlugins()
Link copied to clipboard
open override fun removePluginStateListener(p0: PluginStateListener)
Link copied to clipboard
protected open fun resolveDependencies(): DependencyResolver.Result
Link copied to clipboard
protected open fun resolvePlugins()
Link copied to clipboard
fun runConfigCheckExtensions(packConfig: PackConfig, configCheck: ConfigCheck = ConfigCheck()): ConfigCheck

Run any and all configuration-check extensions, using the passed configuration model and the destination at which the server pack is to be generated and stored at.

Link copied to clipboard
fun runPostGenExtensions(packConfig: PackConfig, destination: String)

Run any and all Post-server pack-generation extensions, using the passed configuration model and the destination at which the server pack is to be generated and stored at.

Link copied to clipboard
fun runPreGenExtensions(packConfig: PackConfig, destination: String)

Run any and all Pre-Server Pack-Generation extensions, using the passed configuration model and the destination at which the server pack is to be generated and stored at.

Link copied to clipboard
fun runPreZipExtensions(packConfig: PackConfig, destination: String)

Run any and all Pre-ZIP-archive creation extensions, using the passed configuration model and the destination at which the server pack is to be generated and stored at.

Link copied to clipboard
Link copied to clipboard
protected open fun setResolveRecoveryStrategy(p0: AbstractPluginManager.ResolveRecoveryStrategy)
Link copied to clipboard
open override fun setSystemVersion(p0: String)
Link copied to clipboard
open override fun startPlugin(p0: String): PluginState
Link copied to clipboard
open override fun startPlugins()
Link copied to clipboard
open override fun stopPlugin(p0: String): PluginState
protected open fun stopPlugin(p0: String, p1: Boolean): PluginState
Link copied to clipboard
open override fun stopPlugins()
Link copied to clipboard
open override fun unloadPlugin(p0: String): Boolean
protected open fun unloadPlugin(p0: String, p1: Boolean): Boolean
Link copied to clipboard
open override fun unloadPlugins()
Link copied to clipboard
protected open fun validatePluginDescriptor(p0: PluginDescriptor)
Link copied to clipboard
open override fun whichPlugin(p0: Class<*>): PluginWrapper