Sort the methods

This commit is contained in:
libraryaddict 2013-11-27 16:55:03 +13:00
parent d9febc03d5
commit 7d7020275e

View File

@ -67,6 +67,16 @@ public class ReflectionManager {
return null;
}
public static Entity getBukkitEntity(Object nmsEntity) {
try {
Entity bukkitEntity = (Entity) ReflectionManager.getNmsClass("Entity").getMethod("getBukkitEntity").invoke(nmsEntity);
return bukkitEntity;
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
public static ItemStack getBukkitItem(Object nmsItem) {
try {
return (ItemStack) itemClass.getMethod("asBukkitCopy", getNmsClass("ItemStack")).invoke(null, nmsItem);
@ -119,16 +129,6 @@ public class ReflectionManager {
return null;
}
public static Entity getBukkitEntity(Object nmsEntity) {
try {
Entity bukkitEntity = (Entity) ReflectionManager.getNmsClass("Entity").getMethod("getBukkitEntity").invoke(nmsEntity);
return bukkitEntity;
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
public static Object getNmsEntity(Entity entity) {
try {
return getCraftClass("entity.CraftEntity").getMethod("getHandle").invoke(entity);