cc.funkemunky.api.utils

## Class ReflectionsUtil

- java.lang.Object
- - cc.funkemunky.api.utils.ReflectionsUtil

    public class ReflectionsUtil
    extends java.lang.Object

### Field Summary

Fields
`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 Summary

Constructors
Constructor and Description
`ReflectionsUtil()`

### Method Summary

All Methods Static Methods Concrete Methods
`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)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### blockPosition

    public static java.lang.Class<?> blockPosition

#### EntityPlayer

    public static java.lang.Class<?> EntityPlayer

#### Entity

    public static java.lang.Class<?> Entity

#### CraftPlayer

    public static java.lang.Class<?> CraftPlayer

#### CraftEntity

    public static java.lang.Class<?> CraftEntity

#### CraftWorld

    public static java.lang.Class<?> CraftWorld

#### World

    public static java.lang.Class<?> World

#### worldServer

    public static java.lang.Class<?> worldServer

#### playerConnection

    public static java.lang.Class<?> playerConnection

#### networkManager

    public static java.lang.Class<?> networkManager

#### minecraftServer

    public static java.lang.Class<?> minecraftServer

#### packet

    public static java.lang.Class<?> packet

#### iBlockData

    public static java.lang.Class<?> iBlockData

#### iBlockAccess

    public static java.lang.Class<?> iBlockAccess

### Constructor Detail

#### ReflectionsUtil

    public ReflectionsUtil()

### Method Detail

#### getEntityPlayer

    public static java.lang.Object getEntityPlayer(org.bukkit.entity.Player player)

#### getEntity

    public static java.lang.Object getEntity(org.bukkit.entity.Entity entity)

#### getExpandedBoundingBox

    public static java.lang.Object getExpandedBoundingBox(java.lang.Object box,
                                                          double x,
                                                          double y,
                                                          double z)

#### modifyBoundingBox

    public static java.lang.Object modifyBoundingBox(java.lang.Object box,
                                                     double minX,
                                                     double minY,
                                                     double minZ,
                                                     double maxX,
                                                     double maxY,
                                                     double maxZ)

#### getMinecraftServer

    public static java.lang.Object getMinecraftServer()

#### toBoundingBox

    public static BoundingBox toBoundingBox(java.lang.Object aaBB)

#### getBlockDurability

    public static float getBlockDurability(org.bukkit.block.Block block)

#### canDestroyBlock

    public static boolean canDestroyBlock(org.bukkit.entity.Player player,
                                          org.bukkit.block.Block block)

#### getVanillaInventory

    public static java.lang.Object getVanillaInventory(org.bukkit.entity.Player player)

#### getFriction

    public static float getFriction(org.bukkit.block.Block block)

#### getBlockPosition

    public static java.lang.Object getBlockPosition(org.bukkit.Location location)

#### getEntitiesInWorld

    public static java.util.List<org.bukkit.entity.Entity> getEntitiesInWorld(org.bukkit.World world)

#### getBlockBoundingBox

    public static BoundingBox getBlockBoundingBox(org.bukkit.block.Block block)

#### getTPS

    public static double getTPS(org.bukkit.Server server)

#### getBlockHardness

    public static float getBlockHardness(org.bukkit.Material material)
                                  throws java.lang.NoSuchMethodException,
                                         java.lang.reflect.InvocationTargetException,
                                         java.lang.IllegalAccessException

Throws:
  `java.lang.NoSuchMethodException`
  `java.lang.reflect.InvocationTargetException`
  `java.lang.IllegalAccessException`

#### getDestroySpeed

    public static float getDestroySpeed(org.bukkit.block.Block block,
                                        org.bukkit.entity.Player player)

#### getVanillaItem

    public static java.lang.Object getVanillaItem(org.bukkit.inventory.ItemStack itemStack)

#### getVanillaItemStack

    public static java.lang.Object getVanillaItemStack(org.bukkit.inventory.ItemStack itemStack)

#### getVanillaBlock

    public static java.lang.Object getVanillaBlock(org.bukkit.block.Block block)

#### getBlockData

    public static java.lang.Object getBlockData(org.bukkit.block.Block block)

#### getBelowBox

    public static java.lang.Object getBelowBox(org.bukkit.entity.Player player,
                                               double below)

#### getBoundingBox

    public static java.lang.Object getBoundingBox(org.bukkit.entity.Player player)

#### getBoundingBox

    public static java.lang.Object getBoundingBox(org.bukkit.entity.Entity entity)

#### isBukkitVerison

    public static boolean isBukkitVerison(java.lang.String version)

#### getPluginFolder

    public static java.io.File getPluginFolder()

#### isNewVersion

    public static boolean isNewVersion()

#### getCBClass

    public static java.lang.Class<?> getCBClass(java.lang.String string)

#### newAxisAlignedBB

    public static java.lang.Object newAxisAlignedBB(double minX,
                                                    double minY,
                                                    double minZ,
                                                    double maxX,
                                                    double maxY,
                                                    double maxZ)

#### newVoxelShape

    public static java.lang.Object newVoxelShape(double minX,
                                                 double minY,
                                                 double minZ,
                                                 double maxX,
                                                 double maxY,
                                                 double maxZ)

#### getMotionY

    public static double getMotionY(org.bukkit.entity.Player player)

#### newAxisAlignedBB

    public static java.lang.Object newAxisAlignedBB(org.bukkit.Location from,
                                                    org.bukkit.Location to)

#### getClass

    public static java.lang.Class<?> getClass(java.lang.String string)

#### getEnum

    public static java.lang.Enum<?> getEnum(java.lang.Class<?> clazz,
                                            java.lang.String enumName)

#### getFieldByName

    public static java.lang.reflect.Field getFieldByName(java.lang.Class<?> clazz,
                                                         java.lang.String fieldName)

#### setFieldValue

    public static java.lang.Object setFieldValue(java.lang.Object object,
                                                 java.lang.reflect.Field field,
                                                 java.lang.Object value)

#### inBlock

    public static boolean inBlock(org.bukkit.entity.Player player,
                                  java.lang.Object axisAlignedBB)

#### getCollidingBlocks

    public static java.util.Collection<?> getCollidingBlocks(org.bukkit.entity.Player player,
                                                             java.lang.Object axisAlignedBB)

Method removed in 1.12 and later versions in NMS

#### getWorldHandle

    public static java.lang.Object getWorldHandle(org.bukkit.World world)

#### getFirstFieldByType

    public static java.lang.reflect.Field getFirstFieldByType(java.lang.Class<?> clazz,
                                                              java.lang.Class<?> type)

#### getMethod

    public static java.lang.reflect.Method getMethod(java.lang.Class<?> clazz,
                                                     java.lang.String methodName,
                                                     java.lang.Class<?>... args)

#### hasMethod

    public static boolean hasMethod(java.lang.Class clazz,
                                    java.lang.reflect.Method method)

#### hasMethod

    public static boolean hasMethod(java.lang.Class clazz,
                                    java.lang.String methodName)

#### getMethodValue

    public static java.lang.Object getMethodValue(java.lang.reflect.Method method,
                                                  java.lang.Object object,
                                                  java.lang.Object... args)

#### hasField

    public static boolean hasField(java.lang.Class<?> object,
                                   java.lang.String fieldName)

#### getMethodValueNoST

    public static java.lang.Object getMethodValueNoST(java.lang.reflect.Method method,
                                                      java.lang.Object object,
                                                      java.lang.Object... args)

#### getFieldValue

    public static java.lang.Object getFieldValue(java.lang.reflect.Field field,
                                                 java.lang.Object object)

#### getFieldValueNoST

    public static java.lang.Object getFieldValueNoST(java.lang.reflect.Field field,
                                                     java.lang.Object object)

#### getFieldByNameNoST

    public static java.lang.reflect.Field getFieldByNameNoST(java.lang.Class<?> clazz,
                                                             java.lang.String fieldName)

#### newInstance

    public static java.lang.Object newInstance(java.lang.Class<?> objectClass,
                                               java.lang.Object... args)

#### getNMSClass

    public static java.lang.Class<?> getNMSClass(java.lang.String string)