mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-16 15:38:14 +01:00
Sort the methods
This commit is contained in:
parent
d9febc03d5
commit
7d7020275e
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user