Package com.alessiodp.core.common
Class ADPPlugin
- java.lang.Object
-
- com.alessiodp.core.common.bootstrap.AbstractADPPlugin
-
- com.alessiodp.core.common.ADPPlugin
-
- All Implemented Interfaces:
ADPBootstrap
public abstract class ADPPlugin extends AbstractADPPlugin
-
-
Field Summary
Fields Modifier and Type Field Description protected AddonManageraddonManagerprotected ADPUpdateradpUpdaterprotected CommandManagercommandManagerprotected ConfigurationManagerconfigurationManagerprotected DatabaseManagerdatabaseManagerprotected JsonHandlerjsonHandlerprotected ADPLoggerloggerprotected LoggerManagerloggerManagerprotected LoginAlertsManagerloginAlertsManagerprotected ADPMessengermessengerprotected IPlayerUtilsplayerUtilsprotected ADPSchedulerschedulerprotected TitleHandlertitleHandler
-
Constructor Summary
Constructors Modifier Constructor Description protectedADPPlugin()protectedADPPlugin(ADPBootstrap bootstrap)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleancanBeLoaded()Can the plugin be loaded?voiddisabling()On plugin disablevoidenabling()On plugin enableintgetJavaVersion()Get the current Java versionintgetJavaVersion(String fullVersion)Get the java version integer based on the full versionabstract List<LibraryUsage>getLibrariesUsages()Returns a list of usages of libraries to load the pluginprotected voidhandle()Load necessaries classes and initialize othersprotected abstract voidinitializeCore()Used to initialize: scheduler, database and configurationprotected abstract voidinitializeJsonHandler()Initialize Json Handler instanceprotected abstract voidinitializeTitleHandler()Initialize Title Handler instanceprotected abstract voidloadCore()Use to load: scheduler, database and configurationvoidloading()On plugin loadabstract voidonDisabling()Used to disable other non-common managersprotected abstract voidpostHandle()Load any other classprotected voidpreHandle()Preparation before the main handle method Initialize necessary classesabstract voidreloadConfiguration()Reload the configuration-
Methods inherited from class com.alessiodp.core.common.bootstrap.AbstractADPPlugin
executeCommand, executeCommandByUser, getAuthor, getBootstrap, getBstatsId, getFolder, getOfflinePlayer, getOnlinePlayers, getPackageName, getPlatform, getPlayer, getPlayerByName, getPluginFallbackName, getPluginName, getResource, getVersion, initializeLogger, isPluginEnabled, registerListener, stopPlugin, unregisterListener
-
-
-
-
Field Detail
-
logger
protected ADPLogger logger
-
addonManager
protected AddonManager addonManager
-
commandManager
protected CommandManager commandManager
-
configurationManager
protected ConfigurationManager configurationManager
-
databaseManager
protected DatabaseManager databaseManager
-
loggerManager
protected LoggerManager loggerManager
-
loginAlertsManager
protected LoginAlertsManager loginAlertsManager
-
messenger
protected ADPMessenger messenger
-
scheduler
protected ADPScheduler scheduler
-
adpUpdater
protected ADPUpdater adpUpdater
-
jsonHandler
protected JsonHandler jsonHandler
-
titleHandler
protected TitleHandler titleHandler
-
playerUtils
protected IPlayerUtils playerUtils
-
-
Constructor Detail
-
ADPPlugin
protected ADPPlugin()
-
ADPPlugin
protected ADPPlugin(ADPBootstrap bootstrap)
-
-
Method Detail
-
loading
public void loading()
On plugin load
-
enabling
public void enabling()
On plugin enable
-
disabling
public void disabling()
On plugin disable
-
onDisabling
public abstract void onDisabling()
Used to disable other non-common managers
-
canBeLoaded
protected boolean canBeLoaded()
Can the plugin be loaded?- Returns:
- true if can be loaded
-
getJavaVersion
public int getJavaVersion()
Get the current Java version- Returns:
- the java version
-
getJavaVersion
public int getJavaVersion(String fullVersion)
Get the java version integer based on the full version- Parameters:
fullVersion- java full version- Returns:
- the integer of the version
-
preHandle
protected final void preHandle()
Preparation before the main handle method Initialize necessary classes
-
handle
protected final void handle()
Load necessaries classes and initialize others
-
postHandle
protected abstract void postHandle()
Load any other class
-
initializeCore
protected abstract void initializeCore()
Used to initialize: scheduler, database and configuration
-
loadCore
protected abstract void loadCore()
Use to load: scheduler, database and configuration
-
reloadConfiguration
public abstract void reloadConfiguration()
Reload the configuration
-
initializeJsonHandler
protected abstract void initializeJsonHandler()
Initialize Json Handler instance
-
initializeTitleHandler
protected abstract void initializeTitleHandler()
Initialize Title Handler instance
-
getLibrariesUsages
public abstract List<LibraryUsage> getLibrariesUsages()
Returns a list of usages of libraries to load the plugin- Returns:
- a list of usages
-
-