mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Ignore synthetic classes when loading BukkitImplAdapter.
This commit is contained in:
parent
39131eb1e5
commit
319f2efe43
@ -89,7 +89,7 @@ public class BukkitImplLoader {
|
|||||||
try {
|
try {
|
||||||
Enumeration<JarEntry> entries = jar.entries();
|
Enumeration<JarEntry> entries = jar.entries();
|
||||||
while (entries.hasMoreElements()) {
|
while (entries.hasMoreElements()) {
|
||||||
JarEntry jarEntry = (JarEntry) entries.nextElement();
|
JarEntry jarEntry = entries.nextElement();
|
||||||
|
|
||||||
String className = jarEntry.getName().replaceAll("[/\\\\]+", ".");
|
String className = jarEntry.getName().replaceAll("[/\\\\]+", ".");
|
||||||
|
|
||||||
@ -153,6 +153,7 @@ public class BukkitImplLoader {
|
|||||||
for (String className : adapterCandidates) {
|
for (String className : adapterCandidates) {
|
||||||
try {
|
try {
|
||||||
Class<?> cls = Class.forName(className);
|
Class<?> cls = Class.forName(className);
|
||||||
|
if (cls.isSynthetic()) continue;
|
||||||
if (BukkitImplAdapter.class.isAssignableFrom(cls)) {
|
if (BukkitImplAdapter.class.isAssignableFrom(cls)) {
|
||||||
return (BukkitImplAdapter) cls.newInstance();
|
return (BukkitImplAdapter) cls.newInstance();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user