mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-24 08:12:32 +01:00
use Check
This commit is contained in:
parent
98067f966e
commit
d8fd80d02d
@ -1,6 +1,7 @@
|
||||
package net.minestom.server.extensions;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import net.minestom.server.utils.validate.Check;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.slf4j.Logger;
|
||||
@ -113,7 +114,7 @@ public final class DiscoveredExtension {
|
||||
}
|
||||
|
||||
public void createClassLoader() {
|
||||
if (classLoader != null) throw new IllegalStateException("Extension classloader has already been created!");
|
||||
Check.stateCondition(classLoader != null, "Extension classloader has already been created");
|
||||
final URL[] urls = this.files.toArray(new URL[0]);
|
||||
classLoader = new ExtensionClassLoader(this.getName(), urls);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user