public class Main
extends org.bukkit.plugin.java.JavaPlugin
Modifier and Type | Field and Description |
---|---|
static boolean |
IMMEDIATE_LOGGING
Whether block changes should be logged immediately.
|
static Locale |
locale
The locale for MGLib itself.
|
static java.util.logging.Logger |
log
MGLib's logger.
|
static LogLevel |
LOGGING_LEVEL
The minimum level at which messages should be logged.
|
Constructor and Description |
---|
Main() |
Modifier and Type | Method and Description |
---|---|
static java.util.HashMap<java.lang.String,java.util.UUID> |
getOnlineUUIDs()
Retrieves a hashmap mapping the names of online players to their
respective UUIDs.
|
static java.util.List<java.lang.String> |
getWorlds(java.lang.String plugin)
Retrieves worlds registered with MGLib's event listener for the given
plugin.
|
static boolean |
isDisabling()
Determines whether MGLib is in the process of disabling.
|
static boolean |
isVanillaSpectatingDisabled()
Retrieves whether vanilla spectating has been globally disabled by
MGLib's config.yml file.
|
static void |
log(java.lang.String message,
LogLevel level)
Internal convenience method for logging.
|
boolean |
onCommand(org.bukkit.command.CommandSender sender,
org.bukkit.command.Command cmd,
java.lang.String label,
java.lang.String[] args) |
void |
onDisable()
Standard
JavaPlugin.onDisable() override. |
void |
onEnable()
Standard
JavaPlugin.onEnable() override. |
static void |
registerWorlds(java.lang.String plugin)
This method should not be called from your plugin.
|
getClassLoader, getCommand, getConfig, getDatabase, getDatabaseClasses, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPlugin, getPluginLoader, getProvidingPlugin, getResource, getServer, getTextResource, initialize, installDDL, isEnabled, isInitialized, isNaggable, onLoad, onTabComplete, reloadConfig, removeDDL, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toString
public static java.util.logging.Logger log
This is for use within the library; please do not use this in your plugin or you'll confuse the server owner.
public static boolean IMMEDIATE_LOGGING
public static LogLevel LOGGING_LEVEL
public static Locale locale
public void onEnable()
JavaPlugin.onEnable()
override.onEnable
in interface org.bukkit.plugin.Plugin
onEnable
in class org.bukkit.plugin.java.JavaPlugin
public void onDisable()
JavaPlugin.onDisable()
override.onDisable
in interface org.bukkit.plugin.Plugin
onDisable
in class org.bukkit.plugin.java.JavaPlugin
public static void registerWorlds(java.lang.String plugin)
This method should not be called from your plugin. So don't use it. Please.
plugin
- the name of the plugin to register worlds forpublic static void log(java.lang.String message, LogLevel level)
message
- the message to log.level
- the level
at which to log the messagepublic boolean onCommand(org.bukkit.command.CommandSender sender, org.bukkit.command.Command cmd, java.lang.String label, java.lang.String[] args)
onCommand
in interface org.bukkit.command.CommandExecutor
onCommand
in class org.bukkit.plugin.java.JavaPlugin
public static java.util.List<java.lang.String> getWorlds(java.lang.String plugin)
plugin
- the plugin to retrieve worlds forpublic static java.util.HashMap<java.lang.String,java.util.UUID> getOnlineUUIDs()
public static boolean isVanillaSpectatingDisabled()
public static boolean isDisabling()