Added a small patch for Libigot.
Dieser Commit ist enthalten in:
Ursprung
310fd18e89
Commit
d643690eef
@ -129,6 +129,9 @@ public class MinecraftReflection {
|
||||
Class<?> craftClass = craftServer.getClass();
|
||||
CRAFTBUKKIT_PACKAGE = getPackage(craftClass.getCanonicalName());
|
||||
|
||||
// Libigot patch
|
||||
handleLibigot();
|
||||
|
||||
// Next, do the same for CraftEntity.getHandle() in order to get the correct Minecraft package
|
||||
Class<?> craftEntity = getCraftEntityClass();
|
||||
Method getHandle = craftEntity.getMethod("getHandle");
|
||||
@ -166,6 +169,20 @@ public class MinecraftReflection {
|
||||
}
|
||||
}
|
||||
|
||||
// Patch for Libigot
|
||||
private static void handleLibigot() {
|
||||
try {
|
||||
getCraftEntityClass();
|
||||
} catch (RuntimeException e) {
|
||||
// Try reverting the package to the old format
|
||||
craftbukkitPackage = null;
|
||||
CRAFTBUKKIT_PACKAGE = "org.bukkit.craftbukkit";
|
||||
|
||||
// This might fail too
|
||||
getCraftEntityClass();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used during debugging and testing.
|
||||
* @param minecraftPackage - the current Minecraft package.
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren