Fixed Empty Team #200
@ -255,7 +255,7 @@ public class TeamCommand extends BasicCommand {
|
||||
user.setTeam(0);
|
||||
|
||||
if(user.isLeader() && team.size() > 0){
|
||||
team.disband();
|
||||
team.disband(user);
|
||||
}
|
||||
|
||||
Message.send("TEAM_LEAVE_LEFT", player);
|
||||
|
@ -154,8 +154,9 @@ public class Team {
|
||||
}
|
||||
}
|
||||
|
||||
public void disband(){
|
||||
SQL.update("UPDATE Team SET TeamDeleted = 1, TeamLeader = NULL WHERE TeamID = ?", teamId);
|
||||
public void disband(SteamwarUser user){
|
||||
user.setLeader(false);
|
||||
SQL.update("UPDATE Team SET TeamDeleted = 1", teamId);
|
||||
teamCache.remove(this);
|
||||
}
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren