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 ApiSettings
static BurchAPI
protected GlobalInventoryListener
protected PluginJsonWriter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Converts a normal string to a formatted oneGets thePluginJsonWriter
instance of this class<T> PackageScanner<T>
Gets a newPackageScanner
instanceboolean
isDebug()
Returns whether the Api is in debug state, this is generally used for theLogger
If you are extending this class, you can Override this method.Returns the logger prefix forLogger
If your class is extending this class, you can Override this method to change the output.void
void
onEnable()
void
Calls after the API disables itselfvoid
Calls after the API enables itselfabstract void
Plugins 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, toString
Methods 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:
onEnable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onEnable
in classorg.bukkit.plugin.java.JavaPlugin
-
onDisable
public void onDisable()- Specified by:
onDisable
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onDisable
in 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 thePluginJsonWriter
instance 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 theLogger
If you are extending this class, you can Override this method.- Returns:
- A
Boolean
true if debugging is active
-
loggerPrefix
Returns the logger prefix forLogger
If your class is extending this class, you can Override this method to change the output.- Returns:
- Any
String
-
getGlobalInventoryListener
-
getPackageScanner
Gets a newPackageScanner
instance- Returns:
- A new generic
PackageScanner
-
convert
Converts a normal string to a formatted one- Parameters:
message
- AnyString
to 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
-