Package com.burchard36.api
Class BurchAPI
java.lang.Object
org.bukkit.plugin.PluginBase
org.bukkit.plugin.java.JavaPlugin
com.burchard36.api.BurchAPI
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor,org.bukkit.command.TabCompleter,org.bukkit.command.TabExecutor,org.bukkit.plugin.Plugin
public abstract class BurchAPI
extends org.bukkit.plugin.java.JavaPlugin
Users of this API are expected to extend this class, rather than JavaPlugin,
BurchAPI will provide methods for JavaPlugin
- Since:
- 2.1.5
- Author:
- Dalton Burchard
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ApiSettingsstatic BurchAPIprotected GlobalInventoryListenerprotected PluginJsonWriter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringConverts a normal string to a formatted oneGets thePluginJsonWriterinstance of this class<T> PackageScanner<T>Gets a newPackageScannerinstancebooleanisDebug()Returns whether the Api is in debug state, this is generally used for theLoggerIf you are extending this class, you can Override this method.Returns the logger prefix forLoggerIf your class is extending this class, you can Override this method to change the output.voidvoidonEnable()voidCalls after the API disables itselfvoidCalls after the API enables itselfabstract voidPlugins can override this and change certain aspects of the API functionality before api initializationMethods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getConfig, getDataFolder, getDefaultBiomeProvider, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, isEnabled, isNaggable, onCommand, onLoad, onTabComplete, reloadConfig, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toStringMethods inherited from class org.bukkit.plugin.PluginBase
equals, getName, hashCode
-
Field Details
-
INSTANCE
-
inventoryListener
-
jsonWriter
-
apiSettings
-
-
Constructor Details
-
BurchAPI
public BurchAPI()
-
-
Method Details
-
onEnable
public void onEnable()- Specified by:
onEnablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onEnablein classorg.bukkit.plugin.java.JavaPlugin
-
onDisable
public void onDisable()- Specified by:
onDisablein interfaceorg.bukkit.plugin.Plugin- Overrides:
onDisablein classorg.bukkit.plugin.java.JavaPlugin
-
onPreApiEnable
public abstract void onPreApiEnable()Plugins can override this and change certain aspects of the API functionality before api initialization- Since:
- 2.1.5
-
getJsonWriter
Gets thePluginJsonWriterinstance of this class- Returns:
- the instance of
PluginJsonWriter
-
isDebug
public boolean isDebug()Returns whether the Api is in debug state, this is generally used for theLoggerIf you are extending this class, you can Override this method.- Returns:
- A
Booleantrue if debugging is active
-
loggerPrefix
Returns the logger prefix forLoggerIf your class is extending this class, you can Override this method to change the output.- Returns:
- Any
String
-
getGlobalInventoryListener
-
getPackageScanner
Gets a newPackageScannerinstance- Returns:
- A new generic
PackageScanner
-
convert
Converts a normal string to a formatted one- Parameters:
message- AnyStringto convert- Returns:
- Converted String
- Since:
- 2.1.5
-
convert
-
onPluginEnable
void onPluginEnable()Calls after the API enables itself- Since:
- 2.1.5
-
onPluginDisable
void onPluginDisable()Calls after the API disables itself- Since:
- 2.1.5
-