diff --git a/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperCB.java b/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperCB.java index c2697cfe..1bbce289 100644 --- a/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperCB.java +++ b/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperCB.java @@ -60,14 +60,9 @@ public class BukkitVersionHelperCB extends BukkitVersionHelperGeneric { Server srv = Bukkit.getServer(); /* Get getHandle() method */ try { - try { - Class.forName("red.mohist.Mohist"); - return "net.minecraft.server.v1_12_R1"; - } catch (Exception x) { - Method m = srv.getClass().getMethod("getHandle"); - Object scm = m.invoke(srv); /* And use it to get SCM (nms object) */ - return scm.getClass().getPackage().getName(); - } + Method m = srv.getClass().getMethod("getHandle"); + Object scm = m.invoke(srv); /* And use it to get SCM (nms object) */ + return scm.getClass().getPackage().getName(); } catch (Exception x) { Log.severe("Error finding net.minecraft.server packages"); return null; @@ -77,11 +72,7 @@ public class BukkitVersionHelperCB extends BukkitVersionHelperGeneric { protected void loadNMS() { // Get block fields nmsblock = getNMSClass("net.minecraft.server.Block"); - try { - nmsblockarray = getNMSClass("[Lnet.minecraft.block.Block;"); - } catch (Exception x) { - nmsblockarray = getNMSClass("[Lnet.minecraft.server.Block;"); - } + nmsblockarray = getNMSClass("[Lnet.minecraft.server.Block;"); nmsmaterial = getNMSClass("net.minecraft.server.Material"); if (isBlockIdNeeded()) { // Not needed for 1.13+ blockbyid = getFieldNoFail(nmsblock, new String[] { "byId" }, nmsblockarray); @@ -97,11 +88,7 @@ public class BukkitVersionHelperCB extends BukkitVersionHelperGeneric { /* Set up biomebase fields */ biomebase = getNMSClass("net.minecraft.server.BiomeBase"); - try { - biomebasearray = getNMSClass("[Lnet.minecraft.world.biome.Biome;"); - } catch (Exception x) { - biomebasearray = getNMSClass("[Lnet.minecraft.server.BiomeBase;"); - } + biomebasearray = getNMSClass("[Lnet.minecraft.server.BiomeBase;"); biomebaselist = getPrivateFieldNoFail(biomebase, new String[] { "biomes" }, biomebasearray); if ((biomebaselist == null) && isBiomeBaseListNeeded()) { getbiomefunc = getMethodNoFail(biomebase, new String[] { "getBiome" }, new Class[] { int.class, biomebase }); diff --git a/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperGeneric.java b/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperGeneric.java index 2949dc73..6ab74dbe 100644 --- a/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperGeneric.java +++ b/bukkit-helper/src/main/java/org/dynmap/bukkit/helper/BukkitVersionHelperGeneric.java @@ -132,11 +132,7 @@ public abstract class BukkitVersionHelperGeneric extends BukkitVersionHelper { cw_gethandle = getMethod(craftworld, new String[] { "getHandle" }, new Class[0]); /* CraftChunkSnapshot */ craftchunksnapshot = getOBCClass("org.bukkit.craftbukkit.CraftChunkSnapshot"); - try { - biomebasearray = getNMSClass("[Lnet.minecraft.world.biome.Biome;"); - } catch (Exception x) { - biomebasearray = getNMSClass("[Lnet.minecraft.server.BiomeBase;"); - } + biomebasearray = getNMSClass("[Lnet.minecraft.server.BiomeBase;"); ccss_biome = getPrivateFieldNoFail(craftchunksnapshot, new String[] { "biome" }, biomebasearray); if(ccss_biome == null) { biomestorage = getNMSClass("net.minecraft.server.BiomeStorage");