Disabled Discord Features By Default

This commit is contained in:
Driftay 2019-09-30 16:03:44 -04:00
parent abf5c45053
commit 07fa138d58
3 changed files with 3 additions and 4 deletions

View File

@ -98,7 +98,7 @@ public class Conf {
public static boolean worldGuardChecking = false; public static boolean worldGuardChecking = false;
public static boolean worldGuardBuildPriority = false; public static boolean worldGuardBuildPriority = false;
//DISCORD //DISCORD
public static boolean useDiscordSystem = true; public static boolean useDiscordSystem = false;
public static String discordBotToken = "<token here>"; public static String discordBotToken = "<token here>";
public static String fromDiscordFactionChatPrefix = "&f[&dDiscord&f] "; public static String fromDiscordFactionChatPrefix = "&f[&dDiscord&f] ";
public static String avatarUrl = "http://cravatar.eu/helmavatar/%uuid%.png"; public static String avatarUrl = "http://cravatar.eu/helmavatar/%uuid%.png";

View File

@ -261,6 +261,8 @@ public class FactionsPlugin extends MPlugin {
} }
if(Conf.useDiscordSystem) { if(Conf.useDiscordSystem) {
new FactionChatHandler(this); new FactionChatHandler(this);
} else {
System.out.println("\n\n\n SABER-FACTIONS-DISCORD-INTEGRATION - You are not using Discord integration features, set conf.json option useDiscordSystem to true and put a valid token in before using!\n\n\n");
} }
ShopConfig.setup(); ShopConfig.setup();

View File

@ -40,9 +40,6 @@ 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();
} }