Little thing to avoid npe's being thrown in the console

This commit is contained in:
Driftay 2019-09-29 06:50:45 -04:00
parent 206914247d
commit 2d0d3c96fc
2 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,6 @@ import com.massivecraft.factions.zcore.util.TL;
import mkremins.fanciful.FancyMessage; import mkremins.fanciful.FancyMessage;
import net.dv8tion.jda.core.JDA; import net.dv8tion.jda.core.JDA;
import net.dv8tion.jda.core.Permission; import net.dv8tion.jda.core.Permission;
import org.bukkit.ChatColor;
public class CmdInviteBot extends FCommand { public class CmdInviteBot extends FCommand {

View File

@ -38,6 +38,9 @@ public class FactionChatHandler extends ListenerAdapter {
private void startBot() { private void startBot() {
try { try {
jda = new JDABuilder(AccountType.BOT).setToken(Conf.discordBotToken).buildBlocking(); jda = new JDABuilder(AccountType.BOT).setToken(Conf.discordBotToken).buildBlocking();
if(jda == null) {
System.out.println("\n\n\n SABER-FACTIONS-DISCORD-INTEGRATION - Please Make a Valid Token To Use Discord Features! Location Conf.json discordBotToken.\n\n\n");
}
} catch (LoginException | InterruptedException e) { } catch (LoginException | InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }