geforkt von SteamWar/BungeeCore
Merge branch 'reworkTeamDeletion' of SteamWar/BungeeCore into master
Dieser Commit ist enthalten in:
Commit
ba6fadc944
@ -56,13 +56,13 @@ public class Team {
|
|||||||
for(Team team : teamCache)
|
for(Team team : teamCache)
|
||||||
if(team.teamKuerzel.equalsIgnoreCase(name))
|
if(team.teamKuerzel.equalsIgnoreCase(name))
|
||||||
return team;
|
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(){
|
public static List<Team> getAll(){
|
||||||
clearCache();
|
clearCache();
|
||||||
try{
|
try{
|
||||||
ResultSet rs = select("SELECT * FROM Team WHERE TeamID > 0");
|
ResultSet rs = select("SELECT * FROM Team WHERE NOT TeamDeleted");
|
||||||
if(rs == null)
|
if(rs == null)
|
||||||
return teamCache;
|
return teamCache;
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ public class Team {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void disband(){
|
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);
|
teamCache.remove(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren