public class AnnoyingPlugin
extends org.bukkit.plugin.java.JavaPlugin
| Modifier and Type | Field and Description |
|---|---|
@NotNull AnnoyingCommandRegister |
commandRegister
Instance of
AnnoyingCommandRegister, used to other plugins' register commands |
@NotNull java.util.Map<java.util.UUID,java.util.Map<AnnoyingCooldown.CooldownType,java.lang.Long>> |
cooldowns
Stores the cooldowns for each player/type
|
@Nullable AnnoyingResource |
messages
The
AnnoyingResource that contains the plugin's messages |
@NotNull AnnoyingOptions |
options
The API options for the plugin
|
| Constructor and Description |
|---|
AnnoyingPlugin()
Create your own constructor, call
super(), and set your options (options) |
| Modifier and Type | Method and Description |
|---|---|
void |
disable()
Called when the plugin is disabled
|
void |
disablePlugin()
Disables the plugin (not the API)
|
void |
enable()
Called after dependency checks, start-up messages, and command/listener registration.
|
@NotNull java.lang.String |
getMessagesString(@NotNull java.lang.String key)
Gets a string from
AnnoyingOptions.messagesFileName with the specified key |
void |
load()
Called when the plugin is loaded
|
void |
log(@Nullable java.util.logging.Level level,
@NotNull java.lang.String message)
Logs a message to the console
|
void |
onDisable()
Called when the plugin is disabled
|
void |
onEnable()
Called when the plugin is enabled.
|
void |
onLoad()
Called after a plugin is loaded but before it has been enabled.
|
void |
reloadPlugin()
Reloads the plugin (calls
PluginManager.disablePlugin(Plugin) and then PluginManager.enablePlugin(Plugin)) |
getClassLoader, getCommand, getConfig, getDatabase, getDatabaseClasses, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, installDDL, isEnabled, isNaggable, onCommand, onTabComplete, reloadConfig, removeDDL, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString@NotNull public final @NotNull AnnoyingCommandRegister commandRegister
AnnoyingCommandRegister, used to other plugins' register commands@NotNull public final @NotNull AnnoyingOptions options
@Nullable public @Nullable AnnoyingResource messages
AnnoyingResource that contains the plugin's messages@NotNull public final @NotNull java.util.Map<java.util.UUID,java.util.Map<AnnoyingCooldown.CooldownType,java.lang.Long>> cooldowns
public AnnoyingPlugin()
super(), and set your options (options)public final void onLoad()
Do not try to override this method! Override load() instead
onLoad in interface org.bukkit.plugin.PluginonLoad in class org.bukkit.plugin.java.JavaPluginload()public final void onEnable()
Do not try to override this method! Override enable() instead
onEnable in interface org.bukkit.plugin.PluginonEnable in class org.bukkit.plugin.java.JavaPluginenable()public final void onDisable()
Do not try to override this method! Override disable() instead
onDisable in interface org.bukkit.plugin.PluginonDisable in class org.bukkit.plugin.java.JavaPlugindisable()public void load()
public void enable()
public void disable()
public void disablePlugin()
This is not meant to be overriden, only override if you know what you're doing!
public void reloadPlugin()
PluginManager.disablePlugin(Plugin) and then PluginManager.enablePlugin(Plugin))
This is not meant to be overriden, only override if you know what you're doing!
public void log(@Nullable
@Nullable java.util.logging.Level level,
@NotNull
@NotNull java.lang.String message)
level - the level of the messagemessage - the message to log@NotNull
public @NotNull java.lang.String getMessagesString(@NotNull
@NotNull java.lang.String key)
AnnoyingOptions.messagesFileName with the specified key
If the string is not found, it will return the key
key - the key of the string