Package net.ME1312.Galaxi.Plugin
Class PluginInfo
java.lang.Object
net.ME1312.Galaxi.Plugin.PluginInfo
- All Implemented Interfaces:
ExtraDataHandler
Plugin Info Class
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an extra value to this Objectget()
Get Plugin Objectstatic PluginInfo
Get an already registered PluginInfo by plugin classstatic PluginInfo
Get an already registered PluginInfo by plugin classGet Authors ListgetBuild()
Get the Plugin's Build VersionGets this Plugin's data folderGets the Dependencies ListGet Plugin DescriptionGet the Plugin's Display NamegetExtra()
Get the extra value sectionGet an extra valuegetIcon()
Get the Plugin's IconGets the Load Before Plugins ListGet the Plugin's ClassLoaderGets the default Logger for this PlugingetName()
Get the Plugin's NameBuilds a stack of relevant platform and versioning information for this plugin (Useful for debugging!)getState()
Get the Plugin's StateGet the Update Checker for this PluginGet the Plugin's VersionGet Authors' Websiteboolean
Determine if an extra value existsboolean
Sets the Plugin's Enabled Statusstatic PluginInfo
Get or register PluginInfo for objects tagged with @App/@Pluginvoid
removeExtra
(String handle) Remove an extra value from this ObjectScans to create a Full Dependency List (which includes the dependencies of your dependencies)void
Set the Plugin's Build Version (may only be done once)void
setDisplayName
(String value) Set the Plugin's Display Namevoid
setEnabled
(boolean value) Sets if the Plugin is Enabledvoid
setIcon
(InputStream stream) Set the Plugin's Iconvoid
Replace this Plugin's Logger with a custom onevoid
Set the Plugin's Statevoid
setUpdateChecker
(Supplier<Boolean> checker) Set the Update Checker for this Plugin
-
Method Details
-
load
Get or register PluginInfo for objects tagged with @App/@Plugin- Parameters:
main
- Class tagged with @App/@Plugin- Returns:
- PluginInfo
- Throws:
InvocationTargetException
-
get
Get an already registered PluginInfo by plugin class- Parameters:
main
- Class tagged with @App/@Plugin- Returns:
- PluginInfo
-
get
Get an already registered PluginInfo by plugin class- Parameters:
main
- Class tagged with @App/@Plugin- Returns:
- PluginInfo
-
getLoader
Get the Plugin's ClassLoader- Returns:
- Plugin ClassLoader
-
get
Get Plugin Object- Returns:
- Plugin Object
-
getIcon
Get the Plugin's Icon- Returns:
- Plugin Icon
-
setIcon
Set the Plugin's Icon- Parameters:
stream
- Icon Stream- Throws:
IOException
-
getName
Get the Plugin's Name- Returns:
- Plugin Name
-
getDisplayName
Get the Plugin's Display Name- Returns:
- Display Name
-
setDisplayName
Set the Plugin's Display Name- Parameters:
value
- Value (or null to reset)
-
getVersion
Get the Plugin's Version- Returns:
- Plugin Version
-
getBuild
Get the Plugin's Build Version- Returns:
- Plugin Build Version
-
setBuild
Set the Plugin's Build Version (may only be done once)- Parameters:
value
- Plugin Build Version
-
getState
Get the Plugin's State- Returns:
- Plugin State
-
setState
Set the Plugin's State- Parameters:
value
- Plugin State
-
getAuthors
Get Authors List- Returns:
- Authors List
-
getDescription
Get Plugin Description- Returns:
- Plugin Description
-
getWebsite
Get Authors' Website- Returns:
- Authors' Website
-
getLoadBefore
Gets the Load Before Plugins List- Returns:
- Load Before Plugins List
-
getDependencies
Gets the Dependencies List- Returns:
- Dependencies List
-
scanDependencies
Scans to create a Full Dependency List (which includes the dependencies of your dependencies)- Returns:
- Full Dependencies List
-
getPlatformStack
Builds a stack of relevant platform and versioning information for this plugin (Useful for debugging!)- Returns:
- Platform Information Stack
-
isEnabled
public boolean isEnabled()Sets the Plugin's Enabled Status- Returns:
- Enabled Status
-
setEnabled
public void setEnabled(boolean value) Sets if the Plugin is Enabled- Parameters:
value
- Value
-
setLogger
Replace this Plugin's Logger with a custom one- Parameters:
value
- Value
-
getLogger
Gets the default Logger for this Plugin- Returns:
- Logger
-
getUpdateChecker
Get the Update Checker for this Plugin- Returns:
- Update Checker
-
setUpdateChecker
Set the Update Checker for this Plugin- Parameters:
checker
- Value (return true when an update is available)
-
getDataFolder
Gets this Plugin's data folder- Returns:
- Data Folder
-
addExtra
Description copied from interface:ExtraDataHandler
Add an extra value to this Object- Specified by:
addExtra
in interfaceExtraDataHandler
- Parameters:
handle
- Handlevalue
- Value
-
hasExtra
Description copied from interface:ExtraDataHandler
Determine if an extra value exists- Specified by:
hasExtra
in interfaceExtraDataHandler
- Parameters:
handle
- Handle- Returns:
- Value Status
-
getExtra
Description copied from interface:ExtraDataHandler
Get an extra value- Specified by:
getExtra
in interfaceExtraDataHandler
- Parameters:
handle
- Handle- Returns:
- Value
-
getExtra
Description copied from interface:ExtraDataHandler
Get the extra value section- Specified by:
getExtra
in interfaceExtraDataHandler
- Returns:
- Extra Value Section
-
removeExtra
Description copied from interface:ExtraDataHandler
Remove an extra value from this Object- Specified by:
removeExtra
in interfaceExtraDataHandler
- Parameters:
handle
- Handle
-