mirror of
https://github.com/ViaVersion/ViaProxy.git
synced 2024-12-22 16:38:04 +01:00
Improved code
This commit is contained in:
parent
30307d8231
commit
bda7244b90
@ -64,7 +64,7 @@ public class PluginManager {
|
||||
}
|
||||
|
||||
private static void loadAndScanJar(final File file) throws Throwable {
|
||||
URLClassLoader loader = new URLClassLoader(new URL[]{new URL("jar:file:" + file.getAbsolutePath() + "!/")}, PluginManager.class.getClassLoader());
|
||||
URLClassLoader loader = new URLClassLoader(new URL[]{file.toURI().toURL()}, PluginManager.class.getClassLoader());
|
||||
InputStream viaproxyYml = loader.getResourceAsStream("viaproxy.yml");
|
||||
if (viaproxyYml == null) throw new IllegalStateException("Plugin '" + file.getName() + "' does not have a viaproxy.yml");
|
||||
Map<String, Object> yaml = YAML.load(viaproxyYml);
|
||||
|
Loading…
Reference in New Issue
Block a user