public class ReflectBukkit extends Object
| Constructor and Description |
|---|
ReflectBukkit() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessedFromBukkit()
Façade method for determining if Bukkit is the invoker of the method
|
static JavaPlugin |
getCallingPlugin()
Returns the
JavaPlugin that immediately called the method in the
current context. |
static JavaPlugin |
getCallingPlugin(int offset)
Returns the
JavaPlugin that immediately called the method in the
current context. |
static World |
getDefaultWorld()
Gets the default
World loaded by Bukkit |
public static World getDefaultWorld()
World loaded by BukkitWorld objectpublic static JavaPlugin getCallingPlugin()
JavaPlugin that immediately called the method in the
current context. Useful for finding out which plugins accessed static API
methods. This method is equivalent to calling
Reflections.getCallingPlugin(0)JavaPluginUnsupportedOperationException - If not called from a
JavaPlugin class (either through an alternative ClassLoader,
executing code directly, or some voodoo magic)getCallingPlugin(int)public static boolean accessedFromBukkit()
true if Bukkit is the direct invoker of the methodpublic static JavaPlugin getCallingPlugin(int offset)
JavaPlugin that immediately called the method in the
current context. Useful for finding out which plugins accessed static API
methodsoffset - The number of additional methods to look backJavaPluginUnsupportedOperationException - If not called from a
JavaPlugin class (either through an alternative ClassLoader,
executing code directly, or some voodoo magic)Copyright © 2017. All rights reserved.