Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
38457db014
Commit
ec9d56dab9
@ -75,6 +75,7 @@ public class SteamwarUser {
|
||||
return;
|
||||
usersByName.remove(user.getUserName());
|
||||
usersByUUID.remove(user.getUUID());
|
||||
usersByDiscord.remove(user.getDiscordId());
|
||||
}
|
||||
|
||||
public static SteamwarUser get(String userName){
|
||||
@ -105,7 +106,7 @@ public class SteamwarUser {
|
||||
}
|
||||
|
||||
public static SteamwarUser getOrCreate(UUID uuid, String name, Consumer<UUID> newPlayer, BiConsumer<String, String> nameUpdate) {
|
||||
SteamwarUser user = SteamwarUser.get(uuid);
|
||||
SteamwarUser user = get(uuid);
|
||||
|
||||
if (user != null) {
|
||||
if (!user.userName.equals(name)) {
|
||||
@ -113,13 +114,13 @@ public class SteamwarUser {
|
||||
nameUpdate.accept(user.userName, name);
|
||||
user.userName = name;
|
||||
}
|
||||
|
||||
return user;
|
||||
} else {
|
||||
insert.update(uuid, name);
|
||||
newPlayer.accept(uuid);
|
||||
return get(uuid);
|
||||
}
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
public static List<SteamwarUser> getServerTeam() {
|
||||
@ -136,7 +137,7 @@ public class SteamwarUser {
|
||||
return;
|
||||
|
||||
try (SelectStatement<SteamwarUser> batch = new SelectStatement<>(table, "SELECT * FROM UserData WHERE id IN (" + ids.stream().map(Object::toString).collect(Collectors.joining(", ")) + ")")) {
|
||||
batch.listSelect();
|
||||
loadPunishments(batch.listSelect());
|
||||
}
|
||||
}
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren