Merge CommonCore Master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Chaoscaot 2023-04-10 12:58:17 +02:00
Ursprung 6c60cc3ce6
Commit 3e064f7e4c
3 geänderte Dateien mit 7 neuen und 32 gelöschten Zeilen

Datei anzeigen

@ -36,7 +36,7 @@ import java.util.*;
import static java.time.temporal.ChronoUnit.SECONDS;
@AllArgsConstructor
public class EventFight implements Comparable<EventFight> {
public class EventFight {
private static final Table<EventFight> table = new Table<>(EventFight.class);
private static final SelectStatement<EventFight> byId = table.select(Table.PRIMARY);

Datei anzeigen

@ -106,6 +106,10 @@ public class SteamwarUser {
return loadPunishments(byDiscord.select(discordId));
}
public static List<SteamwarUser> getAll() {
return getAll.listSelect();
}
public static SteamwarUser getOrCreate(UUID uuid, String name, Consumer<UUID> newPlayer, BiConsumer<String, String> nameUpdate) {
SteamwarUser user = get(uuid);
@ -278,33 +282,4 @@ public class SteamwarUser {
usersByDiscord.put(discordId, this);
}
}
public static SteamwarUser get(int id) {
SteamwarUser user = usersById.get(id);
if(user != null)
return user;
return byID.select(id);
}
public static SteamwarUser get(Long discordId) {
if(usersByDiscord.containsKey(discordId))
return usersByDiscord.get(discordId);
return byDiscord.select(discordId);
}
public static List<SteamwarUser> getAll() {
return getAll.listSelect();
}
public static void createOrUpdateUsername(UUID uuid, String userName) {
insert.update(uuid, userName);
}
public static List<SteamwarUser> getServerTeam() {
return getServerTeam.listSelect();
}
public static List<SteamwarUser> getTeam(int teamId) {
return byTeam.listSelect(teamId);
}
}

Datei anzeigen

@ -76,9 +76,9 @@ public class Team {
public static Team get(int id) {
if(id == -1)
return new Team(-1, "?", "?", "8");
return new Team(-1, "?", "?", "8", "", 25565, false);
if(id == 0)
return pub;
return new Team(0, "PUB", "Public", "8", "", 25565, false);
return byId.select(id);
}