Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Ursprung
6761489ebf
Commit
d86ac64ac9
@ -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()));
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren