mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-10-31 08:32:18 +01:00
Change NPE to IllegalState in Sponge loader's jarinjar presence check
This commit is contained in:
parent
bbfa71a4b2
commit
da882301bc
@ -39,7 +39,6 @@ import java.io.IOException;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.net.URL;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
@Plugin("discordsrv")
|
||||
@ -102,7 +101,11 @@ public class DiscordSRVSpongeLoader implements ILoader {
|
||||
|
||||
@Override
|
||||
public @NotNull URL getJarInJarResource() {
|
||||
return Objects.requireNonNull(getParentClassLoader().getResource("sponge.jarinjar"));
|
||||
URL resource = getParentClassLoader().getResource("sponge.jarinjar");
|
||||
if (resource == null) {
|
||||
throw new IllegalStateException("Jar does not contain jarinjar");
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
|
||||
@Listener
|
||||
|
Loading…
Reference in New Issue
Block a user