geforkt von SteamWar/BungeeCore
Fixed Empty Team
Dieser Commit ist enthalten in:
Ursprung
2a16c8c66b
Commit
93d463365a
@ -255,7 +255,7 @@ public class TeamCommand extends BasicCommand {
|
|||||||
user.setTeam(0);
|
user.setTeam(0);
|
||||||
|
|
||||||
if(user.isLeader() && team.size() > 0){
|
if(user.isLeader() && team.size() > 0){
|
||||||
team.disband();
|
team.disband(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
Message.send("TEAM_LEAVE_LEFT", player);
|
Message.send("TEAM_LEAVE_LEFT", player);
|
||||||
|
@ -154,8 +154,9 @@ public class Team {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void disband(){
|
public void disband(SteamwarUser user){
|
||||||
SQL.update("UPDATE Team SET TeamDeleted = 1, TeamLeader = NULL WHERE TeamID = ?", teamId);
|
user.setLeader(false);
|
||||||
|
SQL.update("UPDATE Team SET TeamDeleted = 1", teamId);
|
||||||
teamCache.remove(this);
|
teamCache.remove(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren