geforkt von SteamWar/BungeeCore
Merge pull request 'Fixed Empty Team' (#200) from Empty_Team_Fix into master
Reviewed-on: SteamWar/BungeeCore#200 Reviewed-by: Zeanon <thezeanon@gmail.com>
Dieser Commit ist enthalten in:
Commit
a2c44718ff
@ -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