diff --git a/api/src/main/java/net/md_5/bungee/api/plugin/PluginClassloader.java b/api/src/main/java/net/md_5/bungee/api/plugin/PluginClassloader.java index c5d0dd09..85203fb8 100644 --- a/api/src/main/java/net/md_5/bungee/api/plugin/PluginClassloader.java +++ b/api/src/main/java/net/md_5/bungee/api/plugin/PluginClassloader.java @@ -2,13 +2,18 @@ package net.md_5.bungee.api.plugin; import java.net.URL; import java.net.URLClassLoader; -import java.util.HashSet; import java.util.Set; +import java.util.concurrent.CopyOnWriteArraySet; public class PluginClassloader extends URLClassLoader { - private static final Set allLoaders = new HashSet<>(); + private static final Set allLoaders = new CopyOnWriteArraySet<>(); + + static + { + ClassLoader.registerAsParallelCapable(); + } public PluginClassloader(URL[] urls) {