mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2025-01-13 20:11:24 +01:00
Missing annotations in Bukkit & Bungee loaders
This commit is contained in:
parent
f3021d1472
commit
bbfa71a4b2
@ -20,22 +20,26 @@ package com.discordsrv.bukkit.loader;
|
||||
|
||||
import dev.vankka.mcdependencydownload.bukkit.loader.BukkitLoader;
|
||||
import dev.vankka.mcdependencydownload.loader.exception.LoadingException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@SuppressWarnings("unused") // Used by Bukkit
|
||||
public class DiscordSRVBukkitLoader extends BukkitLoader {
|
||||
|
||||
@Override
|
||||
public String getBootstrapClassName() {
|
||||
public @NotNull String getBootstrapClassName() {
|
||||
return "com.discordsrv.bukkit.DiscordSRVBukkitBootstrap";
|
||||
}
|
||||
|
||||
@Override
|
||||
public URL getJarInJarResource() {
|
||||
return getClassLoader().getResource("bukkit.jarinjar");
|
||||
public @NotNull URL getJarInJarResource() {
|
||||
URL resource = getClassLoader().getResource("bukkit.jarinjar");
|
||||
if (resource == null) {
|
||||
throw new IllegalStateException("Jar does not contain jarinjar");
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -20,6 +20,7 @@ package com.discordsrv.bungee.loader;
|
||||
|
||||
import dev.vankka.mcdependencydownload.bungee.loader.BungeeLoader;
|
||||
import dev.vankka.mcdependencydownload.loader.exception.LoadingException;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.logging.Level;
|
||||
@ -28,13 +29,17 @@ import java.util.logging.Level;
|
||||
public class DiscordSRVBungeeLoader extends BungeeLoader {
|
||||
|
||||
@Override
|
||||
public String getBootstrapClassName() {
|
||||
public @NotNull String getBootstrapClassName() {
|
||||
return "com.discordsrv.bungee.DiscordSRVBungeeBootstrap";
|
||||
}
|
||||
|
||||
@Override
|
||||
public URL getJarInJarResource() {
|
||||
return getClass().getClassLoader().getResource("bungee.jarinjar");
|
||||
public @NotNull URL getJarInJarResource() {
|
||||
URL resource = getClass().getClassLoader().getResource("bungee.jarinjar");
|
||||
if (resource == null) {
|
||||
throw new IllegalStateException("Jar does not contain jarinjar");
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user