Cleaned up code. Fixed error for sounds handling

This commit is contained in:
libraryaddict
2013-12-08 07:51:37 +13:00
parent 1434bdc49e
commit cdc02b4090
4 changed files with 24 additions and 20 deletions

View File

@@ -12,10 +12,10 @@ import org.bukkit.entity.Entity;
import org.bukkit.inventory.ItemStack;
public class ReflectionManager {
private static boolean after17 = true;
private static String bukkitVersion = Bukkit.getServer().getClass().getName().split("\\.")[3];
private static Class itemClass;
private static Method soundMethod;
private static boolean after17 = true;
static {
for (Method method : getNmsClass("EntityLiving").getDeclaredMethods()) {
try {
@@ -53,11 +53,7 @@ public class ReflectionManager {
}
}
}public static boolean isAfter17() {
return after17;
}
public static Object createEntityInstance(String entityName) {
}public static Object createEntityInstance(String entityName) {
try {
Class entityClass = getNmsClass("Entity" + entityName);
Object entityObject;
@@ -194,4 +190,8 @@ public class ReflectionManager {
return null;
}
public static boolean isAfter17() {
return after17;
}
}