Hotfix ChatListener and RankCommand die letzte
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Ursprung
c90de5c455
Commit
f5306a8ba0
@ -118,4 +118,9 @@ public class ArenaMode extends GameModeConfig {
|
||||
return getServer().getChatNames().isEmpty();
|
||||
}
|
||||
|
||||
public String getSchemTypeOrInternalName() {
|
||||
Schematic schematic = getSchematic();
|
||||
if (schematic == null) return internalName;
|
||||
return schematic.getType();
|
||||
}
|
||||
}
|
||||
|
@ -48,10 +48,10 @@ public class RankCommand extends SWCommand {
|
||||
if (!mode.isRanked())
|
||||
continue;
|
||||
|
||||
Optional<Integer> elo = UserElo.getElo(user.getId(), mode.getSchemType());
|
||||
Optional<Integer> elo = UserElo.getElo(user.getId(), mode.getSchemTypeOrInternalName());
|
||||
Message eloMsg;
|
||||
if (elo.isPresent()) {
|
||||
int placement = UserElo.getPlacement(elo.get(), mode.getSchemType());
|
||||
int placement = UserElo.getPlacement(elo.get(), mode.getSchemTypeOrInternalName());
|
||||
eloMsg = new Message("RANK_PLACED", placement, elo.get());
|
||||
} else {
|
||||
eloMsg = new Message("RANK_UNPLACED");
|
||||
|
@ -52,10 +52,7 @@ public class ChatListener extends BasicListener {
|
||||
|
||||
private static final Logger cmdLogger = Logger.getLogger("Command logger");
|
||||
|
||||
private static final List<String> rankedModes = ArenaMode.getAllModes().stream().filter(ArenaMode::isRanked).map(arenaMode -> {
|
||||
if (arenaMode.getSchematic() != null) return arenaMode.getSchemType();
|
||||
return arenaMode.getChatName();
|
||||
}).toList();
|
||||
private static final List<String> rankedModes = ArenaMode.getAllModes().stream().filter(ArenaMode::isRanked).map(ArenaMode::getSchemTypeOrInternalName).toList();
|
||||
|
||||
@Subscribe(order = PostOrder.FIRST)
|
||||
public void fixCommands(CommandExecuteEvent e) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren