3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 16:12:42 +01:00
Fixes #1825
Dieser Commit ist enthalten in:
KennyTV 2020-06-25 12:39:49 +02:00
Ursprung 6761489ebf
Commit d86ac64ac9
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -17,6 +17,7 @@ import us.myles.ViaVersion.bukkit.util.NMSUtil;
import java.lang.reflect.Method; import java.lang.reflect.Method;
//TODO maybe clean this up a bit 👀
public class ClassGenerator { public class ClassGenerator {
private static HandlerConstructor constructor = new BasicHandlerConstructor(); private static HandlerConstructor constructor = new BasicHandlerConstructor();
private static String psPackage; private static String psPackage;
@ -30,6 +31,7 @@ public class ClassGenerator {
if (ViaVersionPlugin.getInstance().isCompatSpigotBuild() || ViaVersionPlugin.getInstance().isProtocolSupport()) { if (ViaVersionPlugin.getInstance().isCompatSpigotBuild() || ViaVersionPlugin.getInstance().isProtocolSupport()) {
try { try {
ClassPool pool = ClassPool.getDefault(); ClassPool pool = ClassPool.getDefault();
pool.insertClassPath(new LoaderClassPath(Bukkit.class.getClassLoader()));
for (Plugin p : Bukkit.getPluginManager().getPlugins()) { for (Plugin p : Bukkit.getPluginManager().getPlugins()) {
pool.insertClassPath(new LoaderClassPath(p.getClass().getClassLoader())); pool.insertClassPath(new LoaderClassPath(p.getClass().getClassLoader()));
} }