public class ReflectionsUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.Class<?> |
blockPosition |
static java.lang.Class<?> |
CraftEntity |
static java.lang.Class<?> |
CraftPlayer |
static java.lang.Class<?> |
CraftWorld |
static java.lang.Class<?> |
Entity |
static java.lang.Class<?> |
EntityPlayer |
static java.lang.Class<?> |
iBlockAccess |
static java.lang.Class<?> |
iBlockData |
static java.lang.Class<?> |
minecraftServer |
static java.lang.Class<?> |
networkManager |
static java.lang.Class<?> |
packet |
static java.lang.Class<?> |
playerConnection |
static java.lang.Class<?> |
World |
static java.lang.Class<?> |
worldServer |
Constructor and Description |
---|
ReflectionsUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canDestroyBlock(org.bukkit.entity.Player player,
org.bukkit.block.Block block) |
static java.lang.Object |
getBelowBox(org.bukkit.entity.Player player,
double below) |
static BoundingBox |
getBlockBoundingBox(org.bukkit.block.Block block) |
static java.lang.Object |
getBlockData(org.bukkit.block.Block block) |
static float |
getBlockDurability(org.bukkit.block.Block block) |
static float |
getBlockHardness(org.bukkit.Material material) |
static java.lang.Object |
getBlockPosition(org.bukkit.Location location) |
static java.lang.Object |
getBoundingBox(org.bukkit.entity.Entity entity) |
static java.lang.Object |
getBoundingBox(org.bukkit.entity.Player player) |
static java.lang.Class<?> |
getCBClass(java.lang.String string) |
static java.lang.Class<?> |
getClass(java.lang.String string) |
static java.util.Collection<?> |
getCollidingBlocks(org.bukkit.entity.Player player,
java.lang.Object axisAlignedBB)
Method removed in 1.12 and later versions in NMS
|
static float |
getDestroySpeed(org.bukkit.block.Block block,
org.bukkit.entity.Player player) |
static java.util.List<org.bukkit.entity.Entity> |
getEntitiesInWorld(org.bukkit.World world) |
static java.lang.Object |
getEntity(org.bukkit.entity.Entity entity) |
static java.lang.Object |
getEntityPlayer(org.bukkit.entity.Player player) |
static java.lang.Enum<?> |
getEnum(java.lang.Class<?> clazz,
java.lang.String enumName) |
static java.lang.Object |
getExpandedBoundingBox(java.lang.Object box,
double x,
double y,
double z) |
static java.lang.reflect.Field |
getFieldByName(java.lang.Class<?> clazz,
java.lang.String fieldName) |
static java.lang.reflect.Field |
getFieldByNameNoST(java.lang.Class<?> clazz,
java.lang.String fieldName) |
static java.lang.Object |
getFieldValue(java.lang.reflect.Field field,
java.lang.Object object) |
static java.lang.Object |
getFieldValueNoST(java.lang.reflect.Field field,
java.lang.Object object) |
static java.lang.reflect.Field |
getFirstFieldByType(java.lang.Class<?> clazz,
java.lang.Class<?> type) |
static float |
getFriction(org.bukkit.block.Block block) |
static java.lang.reflect.Method |
getMethod(java.lang.Class<?> clazz,
java.lang.String methodName,
java.lang.Class<?>... args) |
static java.lang.Object |
getMethodValue(java.lang.reflect.Method method,
java.lang.Object object,
java.lang.Object... args) |
static java.lang.Object |
getMethodValueNoST(java.lang.reflect.Method method,
java.lang.Object object,
java.lang.Object... args) |
static java.lang.Object |
getMinecraftServer() |
static double |
getMotionY(org.bukkit.entity.Player player) |
static java.lang.Class<?> |
getNMSClass(java.lang.String string) |
static java.io.File |
getPluginFolder() |
static double |
getTPS(org.bukkit.Server server) |
static java.lang.Object |
getVanillaBlock(org.bukkit.block.Block block) |
static java.lang.Object |
getVanillaInventory(org.bukkit.entity.Player player) |
static java.lang.Object |
getVanillaItem(org.bukkit.inventory.ItemStack itemStack) |
static java.lang.Object |
getVanillaItemStack(org.bukkit.inventory.ItemStack itemStack) |
static java.lang.Object |
getWorldHandle(org.bukkit.World world) |
static boolean |
hasField(java.lang.Class<?> object,
java.lang.String fieldName) |
static boolean |
hasMethod(java.lang.Class clazz,
java.lang.reflect.Method method) |
static boolean |
hasMethod(java.lang.Class clazz,
java.lang.String methodName) |
static boolean |
inBlock(org.bukkit.entity.Player player,
java.lang.Object axisAlignedBB) |
static boolean |
isBukkitVerison(java.lang.String version) |
static boolean |
isNewVersion() |
static java.lang.Object |
modifyBoundingBox(java.lang.Object box,
double minX,
double minY,
double minZ,
double maxX,
double maxY,
double maxZ) |
static java.lang.Object |
newAxisAlignedBB(double minX,
double minY,
double minZ,
double maxX,
double maxY,
double maxZ) |
static java.lang.Object |
newAxisAlignedBB(org.bukkit.Location from,
org.bukkit.Location to) |
static java.lang.Object |
newInstance(java.lang.Class<?> objectClass,
java.lang.Object... args) |
static java.lang.Object |
newVoxelShape(double minX,
double minY,
double minZ,
double maxX,
double maxY,
double maxZ) |
static java.lang.Object |
setFieldValue(java.lang.Object object,
java.lang.reflect.Field field,
java.lang.Object value) |
static BoundingBox |
toBoundingBox(java.lang.Object aaBB) |
public static java.lang.Class<?> blockPosition
public static java.lang.Class<?> EntityPlayer
public static java.lang.Class<?> Entity
public static java.lang.Class<?> CraftPlayer
public static java.lang.Class<?> CraftEntity
public static java.lang.Class<?> CraftWorld
public static java.lang.Class<?> World
public static java.lang.Class<?> worldServer
public static java.lang.Class<?> playerConnection
public static java.lang.Class<?> networkManager
public static java.lang.Class<?> minecraftServer
public static java.lang.Class<?> packet
public static java.lang.Class<?> iBlockData
public static java.lang.Class<?> iBlockAccess
public static java.lang.Object getEntityPlayer(org.bukkit.entity.Player player)
public static java.lang.Object getEntity(org.bukkit.entity.Entity entity)
public static java.lang.Object getExpandedBoundingBox(java.lang.Object box, double x, double y, double z)
public static java.lang.Object modifyBoundingBox(java.lang.Object box, double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
public static java.lang.Object getMinecraftServer()
public static BoundingBox toBoundingBox(java.lang.Object aaBB)
public static float getBlockDurability(org.bukkit.block.Block block)
public static boolean canDestroyBlock(org.bukkit.entity.Player player, org.bukkit.block.Block block)
public static java.lang.Object getVanillaInventory(org.bukkit.entity.Player player)
public static float getFriction(org.bukkit.block.Block block)
public static java.lang.Object getBlockPosition(org.bukkit.Location location)
public static java.util.List<org.bukkit.entity.Entity> getEntitiesInWorld(org.bukkit.World world)
public static BoundingBox getBlockBoundingBox(org.bukkit.block.Block block)
public static double getTPS(org.bukkit.Server server)
public static float getBlockHardness(org.bukkit.Material material) throws java.lang.NoSuchMethodException, java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
public static float getDestroySpeed(org.bukkit.block.Block block, org.bukkit.entity.Player player)
public static java.lang.Object getVanillaItem(org.bukkit.inventory.ItemStack itemStack)
public static java.lang.Object getVanillaItemStack(org.bukkit.inventory.ItemStack itemStack)
public static java.lang.Object getVanillaBlock(org.bukkit.block.Block block)
public static java.lang.Object getBlockData(org.bukkit.block.Block block)
public static java.lang.Object getBelowBox(org.bukkit.entity.Player player, double below)
public static java.lang.Object getBoundingBox(org.bukkit.entity.Player player)
public static java.lang.Object getBoundingBox(org.bukkit.entity.Entity entity)
public static boolean isBukkitVerison(java.lang.String version)
public static java.io.File getPluginFolder()
public static boolean isNewVersion()
public static java.lang.Class<?> getCBClass(java.lang.String string)
public static java.lang.Object newAxisAlignedBB(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
public static java.lang.Object newVoxelShape(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
public static double getMotionY(org.bukkit.entity.Player player)
public static java.lang.Object newAxisAlignedBB(org.bukkit.Location from, org.bukkit.Location to)
public static java.lang.Class<?> getClass(java.lang.String string)
public static java.lang.Enum<?> getEnum(java.lang.Class<?> clazz, java.lang.String enumName)
public static java.lang.reflect.Field getFieldByName(java.lang.Class<?> clazz, java.lang.String fieldName)
public static java.lang.Object setFieldValue(java.lang.Object object, java.lang.reflect.Field field, java.lang.Object value)
public static boolean inBlock(org.bukkit.entity.Player player, java.lang.Object axisAlignedBB)
public static java.util.Collection<?> getCollidingBlocks(org.bukkit.entity.Player player, java.lang.Object axisAlignedBB)
public static java.lang.Object getWorldHandle(org.bukkit.World world)
public static java.lang.reflect.Field getFirstFieldByType(java.lang.Class<?> clazz, java.lang.Class<?> type)
public static java.lang.reflect.Method getMethod(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Class<?>... args)
public static boolean hasMethod(java.lang.Class clazz, java.lang.reflect.Method method)
public static boolean hasMethod(java.lang.Class clazz, java.lang.String methodName)
public static java.lang.Object getMethodValue(java.lang.reflect.Method method, java.lang.Object object, java.lang.Object... args)
public static boolean hasField(java.lang.Class<?> object, java.lang.String fieldName)
public static java.lang.Object getMethodValueNoST(java.lang.reflect.Method method, java.lang.Object object, java.lang.Object... args)
public static java.lang.Object getFieldValue(java.lang.reflect.Field field, java.lang.Object object)
public static java.lang.Object getFieldValueNoST(java.lang.reflect.Field field, java.lang.Object object)
public static java.lang.reflect.Field getFieldByNameNoST(java.lang.Class<?> clazz, java.lang.String fieldName)
public static java.lang.Object newInstance(java.lang.Class<?> objectClass, java.lang.Object... args)
public static java.lang.Class<?> getNMSClass(java.lang.String string)