forked from SteamWar/SteamWar
Fix 1.15- reflections
This commit is contained in:
@@ -152,7 +152,7 @@ public final class Reflection {
|
|||||||
if(name.startsWith("org.bukkit.craftbukkit")) {
|
if(name.startsWith("org.bukkit.craftbukkit")) {
|
||||||
return Class.forName(ORG_BUKKIT_CRAFTBUKKIT + name.substring(22));
|
return Class.forName(ORG_BUKKIT_CRAFTBUKKIT + name.substring(22));
|
||||||
} else if(MAJOR_VERSION < 17 && name.startsWith("net.minecraft")) {
|
} else if(MAJOR_VERSION < 17 && name.startsWith("net.minecraft")) {
|
||||||
return Class.forName(LEGACY_NET_MINECRAFT_SERVER + "." + name.split("[.](?=[^.]*$)")[1]);
|
return Class.forName(LEGACY_NET_MINECRAFT_SERVER + "." + spigotClassnames.getOrDefault(name, name).split("[.](?=[^.]*$)")[1]);
|
||||||
} else if(MAJOR_VERSION < 21 || MINOR_VERSION < 4) {
|
} else if(MAJOR_VERSION < 21 || MINOR_VERSION < 4) {
|
||||||
return Class.forName(spigotClassnames.getOrDefault(name, name));
|
return Class.forName(spigotClassnames.getOrDefault(name, name));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user