Interface PluginState
- All Known Implementing Classes:
PluginStateImpl
public interface PluginState
This object provides information the current state of the plugin, and
provides various mechanisms to query and control plugins and their integration
with the client at a low-level.
Most plugins will have no need to interact with this object - it is primarily
used by the client for plugin management.
- Since:
- 3.1.1.1
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if there was a problem loading or initialising the plugin.booleanBuilt-in plugins are those used internally by the client, for example the UPnP plugin.booleanReturns true if the plugin has been marked as disabled, and prevented from initialising.booleanbooleanReturns true if the plugin is set to load at startup, false otherwise.booleanWhether or not this is a mandatory plugin.booleanReturns true if the plugin is running, returns false if the plugin isn't running for some reason.booleanbooleanisShared()booleanbooleanvoidreload()voidsetDisabled(boolean disabled) Sets whether the plugin can be loaded or not.voidsetLoadedAtStartup(boolean load_at_startup) Sets whether the plugin is loaded at startup or not.voidsetRestartPending(boolean b) voidUninstall this plugin if it has been loaded from a plugin directory.voidunload()
-
Method Details
-
isLoadedAtStartup
boolean isLoadedAtStartup()Returns true if the plugin is set to load at startup, false otherwise. -
setLoadedAtStartup
void setLoadedAtStartup(boolean load_at_startup) Sets whether the plugin is loaded at startup or not. -
hasFailed
boolean hasFailed()Returns true if there was a problem loading or initialising the plugin. -
isDisabled
boolean isDisabled()Returns true if the plugin has been marked as disabled, and prevented from initialising. -
setDisabled
void setDisabled(boolean disabled) Sets whether the plugin can be loaded or not. If you are trying to affect if the plugin can be loaded at startup - usesetLoadedAtStartup(boolean)instead. This needs to be called prior to a plugin's initialisation to take effect.- Parameters:
disabled-
-
isBuiltIn
boolean isBuiltIn()Built-in plugins are those used internally by the client, for example the UPnP plugin. -
isMandatory
boolean isMandatory()Whether or not this is a mandatory plugin. Mandatory plugins take priority over update checks, for example, over optional ones. -
isOperational
boolean isOperational()Returns true if the plugin is running, returns false if the plugin isn't running for some reason. -
isInitialisationComplete
boolean isInitialisationComplete() -
isRestartPending
boolean isRestartPending() -
setRestartPending
void setRestartPending(boolean b) -
uninstall
Uninstall this plugin if it has been loaded from a plugin directory. Deletes the plugin directory.- Throws:
PluginException
-
isUnloadable
boolean isUnloadable() -
isUnloaded
boolean isUnloaded() -
unload
- Throws:
PluginException
-
reload
- Throws:
PluginException
-