Fix BungeeCord's PluginClassLoader constructor reflection
This commit is contained in:
parent
55f80bf934
commit
150a9ac86b
1 changed files with 9 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ package net.frankheijden.serverutils.bungee.reflection;
|
|||
|
||||
import java.net.URL;
|
||||
import java.util.Set;
|
||||
import dev.frankheijden.minecraftreflection.ClassObject;
|
||||
import dev.frankheijden.minecraftreflection.MinecraftReflection;
|
||||
import net.md_5.bungee.api.ProxyServer;
|
||||
import net.md_5.bungee.api.plugin.Plugin;
|
||||
|
|
@ -12,8 +13,15 @@ public class RPluginClassLoader {
|
|||
private static final MinecraftReflection reflection = MinecraftReflection
|
||||
.of("net.md_5.bungee.api.plugin.PluginClassloader");
|
||||
|
||||
/**
|
||||
* Creates a new instance of a PluginClassLoader from given parameters.
|
||||
*/
|
||||
public static Object newInstance(ProxyServer proxy, PluginDescription desc, URL... urls) {
|
||||
return reflection.newInstance(proxy, desc, urls);
|
||||
return reflection.newInstance(
|
||||
ClassObject.of(ProxyServer.class, proxy),
|
||||
ClassObject.of(PluginDescription.class, desc),
|
||||
ClassObject.of(URL[].class, urls)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue