Skip to content

Commit

Permalink
Little thing to avoid npe's being thrown in the console
Browse files Browse the repository at this point in the history
  • Loading branch information
Driftay committed Sep 29, 2019
1 parent 2069142 commit 2d0d3c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import mkremins.fanciful.FancyMessage;
import net.dv8tion.jda.core.JDA;
import net.dv8tion.jda.core.Permission;
import org.bukkit.ChatColor;

public class CmdInviteBot extends FCommand {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public FactionChatHandler(FactionsPlugin plugin) {
private void startBot() {
try {
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) {
e.printStackTrace();
}
Expand Down

0 comments on commit 2d0d3c9

Please sign in to comment.