Little thing to avoid npe's being thrown in the console
This commit is contained in:
parent
206914247d
commit
2d0d3c96fc
@ -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 {
|
||||||
|
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user