public class PluginManager
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
void |
disablePlugins()
Disable all loaded plugins.
|
void |
enablePlugins()
Enable all loaded plugins.
|
static PluginManager |
get() |
static @NotNull java.util.List<java.lang.reflect.Method> |
getMethodsAnnotatedWith(java.lang.Class<?> type,
java.lang.Class<? extends java.lang.annotation.Annotation> annotation) |
java.util.concurrent.ConcurrentLinkedQueue<PluginContainer> |
getPlugins() |
java.util.Map<PluginContainer,java.util.HashMap<java.lang.Class<? extends LPFEvent>,java.lang.reflect.Method>> |
getRegisteredEvents() |
void |
loadPlugins(@NotNull IPluginLoader loader)
Apply the given plugin loader to load plugins
|
void |
registerEvents(@NotNull Plugin plugin)
Look through the plugin's associated methods, and look for the
PluginEvent annotation. |
void |
unloadPlugins()
Unload and remove all loaded plugins.
|
public static PluginManager get()
@NotNull
public static @NotNull java.util.List<java.lang.reflect.Method> getMethodsAnnotatedWith(java.lang.Class<?> type,
java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
public java.util.concurrent.ConcurrentLinkedQueue<PluginContainer> getPlugins()
public void registerEvents(@NotNull
@NotNull Plugin plugin)
PluginEvent annotation.
Register those methods as listeners.plugin - the pluginpublic void loadPlugins(@NotNull
@NotNull IPluginLoader loader)
loader - the plugin loader to usepublic void enablePlugins()
public void disablePlugins()
public void unloadPlugins()
public final java.util.Map<PluginContainer,java.util.HashMap<java.lang.Class<? extends LPFEvent>,java.lang.reflect.Method>> getRegisteredEvents()