diff --git a/common/src/main/java/me/lucko/luckperms/common/plugin/classpath/URLClassLoaderAccess.java b/common/src/main/java/me/lucko/luckperms/common/plugin/classpath/URLClassLoaderAccess.java index 6cdc7a7d0..4e7f90af5 100644 --- a/common/src/main/java/me/lucko/luckperms/common/plugin/classpath/URLClassLoaderAccess.java +++ b/common/src/main/java/me/lucko/luckperms/common/plugin/classpath/URLClassLoaderAccess.java @@ -167,8 +167,10 @@ public abstract class URLClassLoaderAccess { URLClassLoaderAccess.throwError(new NullPointerException("unopenedURLs or pathURLs")); } - this.unopenedURLs.add(url); - this.pathURLs.add(url); + synchronized (this.unopenedURLs) { + this.unopenedURLs.add(url); + this.pathURLs.add(url); + } } }