geforkt von SteamWar/BungeeCore
Update DiscordBot integration
Dieser Commit ist enthalten in:
Ursprung
f8d6b73c0f
Commit
0cdcfc12a8
@ -154,7 +154,9 @@ public class BungeeCore extends Plugin {
|
|||||||
Team.clearCache();
|
Team.clearCache();
|
||||||
}, 1, 1, TimeUnit.HOURS);
|
}, 1, 1, TimeUnit.HOURS);
|
||||||
|
|
||||||
new SteamwarDiscordBot();
|
if (SteamwarDiscordBotConfig.loaded) {
|
||||||
|
new SteamwarDiscordBot();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -267,7 +269,9 @@ public class BungeeCore extends Plugin {
|
|||||||
);
|
);
|
||||||
|
|
||||||
ArenaMode.init(config.getSection("games"));
|
ArenaMode.init(config.getSection("games"));
|
||||||
SteamwarDiscordBotConfig.loadConfig(config.getSection("discord"));
|
if (config.getSection("discord") != null) {
|
||||||
|
SteamwarDiscordBotConfig.loadConfig(config.getSection("discord"));
|
||||||
|
}
|
||||||
|
|
||||||
final Configuration servers = config.getSection("servers");
|
final Configuration servers = config.getSection("servers");
|
||||||
for(final String serverName : servers.getKeys()){
|
for(final String serverName : servers.getKeys()){
|
||||||
|
@ -29,6 +29,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class SteamwarDiscordBotConfig {
|
public class SteamwarDiscordBotConfig {
|
||||||
|
|
||||||
|
public static boolean loaded = false;
|
||||||
public static String TOKEN;
|
public static String TOKEN;
|
||||||
public static String GUILD;
|
public static String GUILD;
|
||||||
public static String ANNOUNCEMENTS_CHANNEL;
|
public static String ANNOUNCEMENTS_CHANNEL;
|
||||||
@ -110,5 +111,6 @@ public class SteamwarDiscordBotConfig {
|
|||||||
for (String type : ranksSections.getKeys()) {
|
for (String type : ranksSections.getKeys()) {
|
||||||
RANKS.put(UserGroup.getUsergroup(type), ranksSections.getString(type));
|
RANKS.put(UserGroup.getUsergroup(type), ranksSections.getString(type));
|
||||||
}
|
}
|
||||||
|
loaded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren