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");
|
||||
@ -165,6 +168,20 @@ public class MinecraftReflection {
|
||||
throw new IllegalStateException("Could not find Bukkit. Is it running?");
|
||||
}
|
||||
}
|
||||
|
||||
// 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.
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren