geforkt von SteamWar/BungeeCore
Merge pull request 'Update DiscordBot integration' (#250) from DiscordBot into master
Reviewed-on: SteamWar/BungeeCore#250 Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
1f02790bc7
@ -154,8 +154,10 @@ public class BungeeCore extends Plugin {
|
||||
Team.clearCache();
|
||||
}, 1, 1, TimeUnit.HOURS);
|
||||
|
||||
if (SteamwarDiscordBotConfig.loaded) {
|
||||
new SteamwarDiscordBot();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDisable(){
|
||||
@ -267,7 +269,9 @@ public class BungeeCore extends Plugin {
|
||||
);
|
||||
|
||||
ArenaMode.init(config.getSection("games"));
|
||||
if (config.getSection("discord") != null) {
|
||||
SteamwarDiscordBotConfig.loadConfig(config.getSection("discord"));
|
||||
}
|
||||
|
||||
final Configuration servers = config.getSection("servers");
|
||||
for(final String serverName : servers.getKeys()){
|
||||
|
@ -29,6 +29,7 @@ import java.util.Map;
|
||||
|
||||
public class SteamwarDiscordBotConfig {
|
||||
|
||||
public static boolean loaded = false;
|
||||
public static String TOKEN;
|
||||
public static String GUILD;
|
||||
public static String ANNOUNCEMENTS_CHANNEL;
|
||||
@ -110,5 +111,6 @@ public class SteamwarDiscordBotConfig {
|
||||
for (String type : ranksSections.getKeys()) {
|
||||
RANKS.put(UserGroup.getUsergroup(type), ranksSections.getString(type));
|
||||
}
|
||||
loaded = true;
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren