Change isNotActive to isActive

This commit is contained in:
2025-04-18 16:50:16 +02:00
parent 7802fdd7d9
commit e5bdbac3c7
3 changed files with 7 additions and 7 deletions
@@ -77,7 +77,7 @@ public class ArenaMode extends GameModeConfig {
public static List<String> getAllChatNames(boolean historic) {
List<String> chatNames = new LinkedList<>();
for(ArenaMode mode : byInternal.values()){
if(!mode.isNotActive() && historic == mode.isHistoric())
if(mode.isActive() && historic == mode.isHistoric())
chatNames.addAll(mode.getServer().getChatNames());
}
return chatNames;
@@ -118,10 +118,10 @@ public class ArenaMode extends GameModeConfig {
return getServer().getChatNames().get(0);
}
public boolean isNotActive() {
if (getServer().getChatNames().isEmpty()) return true;
if (ActiveMonths.isEmpty()) return false;
return !ActiveMonths.contains(LocalDateTime.now().getMonth().getValue());
public boolean isActive() {
if (getServer().getChatNames().isEmpty()) return false;
if (ActiveMonths.isEmpty()) return true;
return ActiveMonths.contains(LocalDateTime.now().getMonth().getValue());
}
public String getSchemTypeOrInternalName() {
@@ -45,7 +45,7 @@ public class FightCommand extends SWCommand {
private static void getModes(Chatter sender, String precommand, boolean historic){
Component start = Component.empty();
for(ArenaMode mode : ArenaMode.getAllModes()){
if (mode.isNotActive() || mode.isHistoric() != historic)
if (!mode.isActive() || mode.isHistoric() != historic)
continue;
String command = precommand + mode.getChatName();
@@ -51,7 +51,7 @@ public class TypeMappers {
public ArenaMode map(Chatter sender, PreviousArguments previousArguments, String s) {
ArenaMode arenaMode = ArenaMode.getByChat(s);
if (arenaMode.isHistoric() != historic) return null;
if (arenaMode.isNotActive()) return null;
if (!arenaMode.isActive()) return null;
return arenaMode;
}