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()
Constructs a new
AnnoyingPlugin instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
disable()
Called when the plugin is disabled
|
void |
disablePlugin()
Disables the plugin.
|
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
messages with the specified key |
void |
load()
Called when the plugin is loaded
|
void |
loadMessages()
Loads the messages.yml file to
messages |
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 |
reload()
Called when the plugin is reloaded
|
void |
reloadPlugin()
Reloads the plugin (
messages, etc...). |
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()
AnnoyingPlugin instance. Registers event handlers for custom eventspublic 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 final void reloadPlugin()
messages, etc...). This will not trigger onLoad() or onEnable()
This is not run automatically (such as onEnable() and onDisable()), it is to be used manually by the plugin itself (ex: in a /reload command)
Do not try to override this method! Override reload() instead
reload()public void load()
public void enable()
public void disable()
public void reload()
reloadPlugin()public void loadMessages()
messagespublic void disablePlugin()
PluginManager.disablePlugin(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 message. If null, Level.INFO will be usedmessage - the message to log