use `Check`

This commit is contained in:
mworzala 2021-12-04 00:15:00 -05:00 committed by TheMode
parent 98067f966e
commit d8fd80d02d
1 changed files with 2 additions and 1 deletions

View File

@ -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);
}