forked from Fascinated/Bat
check feature states
This commit is contained in:
parent
f7aba7a49b
commit
6fef1d0092
@ -36,7 +36,7 @@ public class BirthdayFeature extends Feature implements EventListener {
|
|||||||
private void checkBirthdays() {
|
private void checkBirthdays() {
|
||||||
for (Guild guild : DiscordService.JDA.getGuilds()) {
|
for (Guild guild : DiscordService.JDA.getGuilds()) {
|
||||||
BatGuild batGuild = guildService.getGuild(guild.getId());
|
BatGuild batGuild = guildService.getGuild(guild.getId());
|
||||||
if (batGuild == null) {
|
if (batGuild.getFeatureProfile().isFeatureDisabled(this)) { // Check if the feature is disabled
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
BirthdayProfile profile = batGuild.getBirthdayProfile();
|
BirthdayProfile profile = batGuild.getBirthdayProfile();
|
||||||
|
@ -38,6 +38,10 @@ public class MinecraftFeature extends Feature {
|
|||||||
public void checkServers() {
|
public void checkServers() {
|
||||||
for (Guild guild : DiscordService.JDA.getGuilds()) {
|
for (Guild guild : DiscordService.JDA.getGuilds()) {
|
||||||
BatGuild batGuild = guildService.getGuild(guild.getId());
|
BatGuild batGuild = guildService.getGuild(guild.getId());
|
||||||
|
if (batGuild.getFeatureProfile().isFeatureDisabled(this)) { // Check if the feature is disabled
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
batGuild.getMinecraftProfile().checkServers();
|
batGuild.getMinecraftProfile().checkServers();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user