Class BukkitPlugin
- java.lang.Object
-
- org.bukkit.plugin.PluginBase
-
- org.bukkit.plugin.java.JavaPlugin
-
- me.syncwrld.booter.minecraft.loader.BukkitPlugin
-
- All Implemented Interfaces:
org.bukkit.command.CommandExecutor
,org.bukkit.command.TabCompleter
,org.bukkit.command.TabExecutor
,org.bukkit.plugin.Plugin
- Direct Known Subclasses:
SpigotLoader
public abstract class BukkitPlugin extends org.bukkit.plugin.java.JavaPlugin
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String[]
asciiArt
protected YAML
configuration
protected boolean
configurationDefault
protected java.util.Collection<ConstantData>
dataCollection
protected com.google.gson.Gson
gson
-
Constructor Summary
Constructors Constructor Description BukkitPlugin()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
callEvent(org.bukkit.event.Event event)
static void
callEvents(org.bukkit.event.Event... events)
java.lang.Object
deserialize(java.lang.String string, java.lang.String type)
org.bukkit.inventory.ItemStack
deserializeItemStack(java.lang.String string)
org.bukkit.Location
deserializeLocation(java.lang.String string)
org.bukkit.configuration.file.FileConfiguration
getConfig()
Deprecated.java.io.File
getConfigFile(java.lang.String name)
org.bukkit.configuration.file.FileConfiguration
getConfigOf(java.lang.String config)
YAML
getConfiguration()
boolean
hasSpigot()
void
log(int num, java.lang.String message)
void
log(java.lang.String message)
void
log(java.lang.String... messages)
void
log(java.lang.String colorCode, java.lang.String message)
void
log(java.lang.String colorCode, java.lang.String[] messages)
void
onDisable()
void
onEnable()
void
onLoad()
org.bukkit.plugin.PluginManager
pluginManager()
void
registerData(ConstantData constantData)
void
registerDatas(ConstantData... constantDatas)
void
registerListener(org.bukkit.event.Listener listener)
void
registerListeners(org.bukkit.event.Listener... listeners)
void
runLater(java.lang.Runnable runnable, long seconds)
void
saveConfig()
void
saveConfig(java.lang.String config)
void
saveDefaultConfig()
void
saveFile(java.lang.String file)
void
saveFile(java.lang.String file, java.lang.String path)
void
saveResource(java.lang.String resourcePath, boolean replace)
void
sendAsciiArt()
void
sendAsciiArt(java.lang.String colorCode)
java.lang.String
serialize(java.lang.Object object)
org.bukkit.Server
server()
void
setAsciiArt(java.lang.String... art)
void
setAutoDataRegistry(boolean b)
void
setConfigurationAsDefault(boolean b)
void
setPrefix(java.lang.String prefix)
void
startRepeatingRunnable(java.lang.Runnable runnable, long delay)
protected abstract void
whenDisable()
protected abstract void
whenEnable()
protected abstract void
whenLoad()
-
Methods inherited from class org.bukkit.plugin.java.JavaPlugin
getClassLoader, getCommand, getDatabase, getDatabaseClasses, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, initialize, installDDL, isEnabled, isInitialized, isNaggable, onCommand, onTabComplete, reloadConfig, removeDDL, setEnabled, setNaggable, toString
-
-
-
-
Field Detail
-
gson
protected final com.google.gson.Gson gson
-
dataCollection
protected final java.util.Collection<ConstantData> dataCollection
-
asciiArt
protected java.lang.String[] asciiArt
-
configuration
protected YAML configuration
-
configurationDefault
protected boolean configurationDefault
-
-
Method Detail
-
callEvent
public static void callEvent(org.bukkit.event.Event event)
-
callEvents
public static void callEvents(org.bukkit.event.Event... events)
-
setConfigurationAsDefault
public void setConfigurationAsDefault(boolean b)
-
whenLoad
protected abstract void whenLoad()
-
whenEnable
protected abstract void whenEnable()
-
whenDisable
protected abstract void whenDisable()
-
getConfigFile
public java.io.File getConfigFile(java.lang.String name)
-
onLoad
public void onLoad()
- Specified by:
onLoad
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
onLoad
in classorg.bukkit.plugin.java.JavaPlugin
-
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
-
log
public void log(java.lang.String message)
-
log
public void log(java.lang.String... messages)
-
log
public void log(int num, java.lang.String message)
-
log
public void log(java.lang.String colorCode, java.lang.String message)
-
log
public void log(java.lang.String colorCode, java.lang.String[] messages)
-
registerListener
public void registerListener(org.bukkit.event.Listener listener)
-
registerListeners
public void registerListeners(org.bukkit.event.Listener... listeners)
-
getConfig
@Deprecated public org.bukkit.configuration.file.FileConfiguration getConfig()
Deprecated.- Specified by:
getConfig
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
getConfig
in classorg.bukkit.plugin.java.JavaPlugin
-
getConfiguration
public YAML getConfiguration()
-
getConfigOf
public org.bukkit.configuration.file.FileConfiguration getConfigOf(java.lang.String config)
-
server
public org.bukkit.Server server()
-
pluginManager
public org.bukkit.plugin.PluginManager pluginManager()
-
saveFile
public void saveFile(java.lang.String file)
-
startRepeatingRunnable
public void startRepeatingRunnable(java.lang.Runnable runnable, long delay)
-
runLater
public void runLater(java.lang.Runnable runnable, long seconds)
-
saveConfig
public void saveConfig(java.lang.String config)
-
saveFile
public void saveFile(java.lang.String file, java.lang.String path)
-
saveResource
public void saveResource(java.lang.String resourcePath, boolean replace)
- Specified by:
saveResource
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
saveResource
in classorg.bukkit.plugin.java.JavaPlugin
-
hasSpigot
public boolean hasSpigot()
-
saveDefaultConfig
public void saveDefaultConfig()
- Specified by:
saveDefaultConfig
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
saveDefaultConfig
in classorg.bukkit.plugin.java.JavaPlugin
-
saveConfig
public void saveConfig()
- Specified by:
saveConfig
in interfaceorg.bukkit.plugin.Plugin
- Overrides:
saveConfig
in classorg.bukkit.plugin.java.JavaPlugin
-
serialize
public java.lang.String serialize(java.lang.Object object)
-
deserialize
public java.lang.Object deserialize(java.lang.String string, java.lang.String type)
-
deserializeLocation
public org.bukkit.Location deserializeLocation(java.lang.String string)
-
deserializeItemStack
public org.bukkit.inventory.ItemStack deserializeItemStack(java.lang.String string)
-
setAsciiArt
public void setAsciiArt(java.lang.String... art)
-
sendAsciiArt
public void sendAsciiArt()
-
sendAsciiArt
public void sendAsciiArt(java.lang.String colorCode)
-
setPrefix
public void setPrefix(java.lang.String prefix)
-
registerData
public void registerData(ConstantData constantData)
-
registerDatas
public void registerDatas(ConstantData... constantDatas)
-
setAutoDataRegistry
public void setAutoDataRegistry(boolean b)
-
-