SteamWar/BungeeCore
Archiviert
13
2

Merge branch 'reworkTeamDeletion' of SteamWar/BungeeCore into master

Dieser Commit ist enthalten in:
Lixfel 2019-12-22 17:24:21 +01:00 committet von Gitea
Commit ba6fadc944

Datei anzeigen

@ -56,13 +56,13 @@ public class Team {
for(Team team : teamCache)
if(team.teamKuerzel.equalsIgnoreCase(name))
return team;
return load(select("SELECT * FROM Team WHERE lower(TeamName) = '" + SQL.disarmString(name).toLowerCase() + "' OR lower(TeamKuerzel) = '" + SQL.disarmString(name).toLowerCase() + "'"));
return load(select("SELECT * FROM Team WHERE (lower(TeamName) = '" + SQL.disarmString(name).toLowerCase() + "' OR lower(TeamKuerzel) = '" + SQL.disarmString(name).toLowerCase() + "') AND NOT TeamDeleted"));
}
public static List<Team> getAll(){
clearCache();
try{
ResultSet rs = select("SELECT * FROM Team WHERE TeamID > 0");
ResultSet rs = select("SELECT * FROM Team WHERE NOT TeamDeleted");
if(rs == null)
return teamCache;
@ -141,7 +141,7 @@ public class Team {
}
public void disband(){
SQL.update("DELETE FROM Team WHERE TeamID = " + teamId);
SQL.update("UPDATE Team SET TeamDeleted = 1, TeamLeader = NULL WHERE TeamID = " + teamId);
teamCache.remove(this);
}