public class ProtocolLibrary
extends org.bukkit.plugin.java.JavaPlugin
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
MAXIMUM_MINECRAFT_VERSION
The maximum version ProtocolLib has been tested with,
|
static java.lang.String |
MINECRAFT_LAST_RELEASE_DATE
The date (with ISO 8601 or YYYY-MM-DD) when the most recent version was released.
|
static java.lang.String |
MINIMUM_MINECRAFT_VERSION
The minimum version ProtocolLib has been tested with.
|
static ReportType |
REPORT_CANNOT_CREATE_TIMEOUT_TASK |
static ReportType |
REPORT_CANNOT_DELETE_CONFIG |
static ReportType |
REPORT_CANNOT_DETECT_CONFLICTING_PLUGINS |
static ReportType |
REPORT_CANNOT_LOAD_CONFIG |
static ReportType |
REPORT_CANNOT_PARSE_INJECTION_METHOD |
static ReportType |
REPORT_CANNOT_PARSE_MINECRAFT_VERSION |
static ReportType |
REPORT_CANNOT_REGISTER_COMMAND |
static ReportType |
REPORT_CANNOT_UPDATE_PLUGIN |
static ReportType |
REPORT_METRICS_GENERIC_ERROR |
static ReportType |
REPORT_METRICS_IO_ERROR |
static ReportType |
REPORT_PLUGIN_ENABLE_ERROR |
static ReportType |
REPORT_PLUGIN_LOAD_ERROR |
| Constructor and Description |
|---|
ProtocolLibrary() |
| Modifier and Type | Method and Description |
|---|---|
static ProtocolConfig |
getConfiguration()
Retrieve the current strongly typed configuration.
|
static ErrorReporter |
getErrorReporter()
Retrieve the current error reporter.
|
static com.google.common.util.concurrent.ListeningScheduledExecutorService |
getExecutorAsync()
Retrieve an executor service for performing asynchronous tasks on the behalf of ProtocolLib.
|
static com.google.common.util.concurrent.ListeningScheduledExecutorService |
getExecutorSync()
Retrieve an executor service for performing synchronous tasks (main thread) on the behalf of ProtocolLib.
|
static ProtocolManager |
getProtocolManager()
Retrieves the packet protocol manager.
|
Statistics |
getStatistics()
Retrieve the metrics instance used to measure users of this library.
|
void |
onDisable() |
void |
onEnable() |
void |
onLoad() |
void |
reloadConfig() |
getClassLoader, getCommand, getConfig, getDatabase, getDatabaseClasses, getDataFolder, getDefaultWorldGenerator, getDescription, getFile, getLogger, getPluginLoader, getResource, getServer, initialize, installDDL, isEnabled, isInitialized, isNaggable, onCommand, onTabComplete, removeDDL, saveConfig, saveDefaultConfig, saveResource, setEnabled, setNaggable, toStringpublic static final ReportType REPORT_CANNOT_LOAD_CONFIG
public static final ReportType REPORT_CANNOT_DELETE_CONFIG
public static final ReportType REPORT_CANNOT_PARSE_INJECTION_METHOD
public static final ReportType REPORT_PLUGIN_LOAD_ERROR
public static final ReportType REPORT_PLUGIN_ENABLE_ERROR
public static final ReportType REPORT_METRICS_IO_ERROR
public static final ReportType REPORT_METRICS_GENERIC_ERROR
public static final ReportType REPORT_CANNOT_PARSE_MINECRAFT_VERSION
public static final ReportType REPORT_CANNOT_DETECT_CONFLICTING_PLUGINS
public static final ReportType REPORT_CANNOT_REGISTER_COMMAND
public static final ReportType REPORT_CANNOT_CREATE_TIMEOUT_TASK
public static final ReportType REPORT_CANNOT_UPDATE_PLUGIN
public static final java.lang.String MINIMUM_MINECRAFT_VERSION
public static final java.lang.String MAXIMUM_MINECRAFT_VERSION
public static final java.lang.String MINECRAFT_LAST_RELEASE_DATE
public void onLoad()
onLoad in interface org.bukkit.plugin.PluginonLoad in class org.bukkit.plugin.java.JavaPluginpublic void reloadConfig()
reloadConfig in interface org.bukkit.plugin.PluginreloadConfig in class org.bukkit.plugin.java.JavaPluginpublic void onEnable()
onEnable in interface org.bukkit.plugin.PluginonEnable in class org.bukkit.plugin.java.JavaPluginpublic void onDisable()
onDisable in interface org.bukkit.plugin.PluginonDisable in class org.bukkit.plugin.java.JavaPluginpublic static ErrorReporter getErrorReporter()
This is guaranteed to not be NULL in 2.5.0 and later.
public static ProtocolConfig getConfiguration()
public static ProtocolManager getProtocolManager()
public Statistics getStatistics()
Note that this method may return NULL when the server is reloading or shutting down. It is also NULL if metrics has been disabled.
public static com.google.common.util.concurrent.ListeningScheduledExecutorService getExecutorAsync()
Note that this service is NULL if ProtocolLib has not been initialized yet.
public static com.google.common.util.concurrent.ListeningScheduledExecutorService getExecutorSync()
Note that this service is NULL if ProtocolLib has not been initialized yet.