Merge pull request 'Fixed Team Leader is Member' (#198) from Team_Leader_Fix into master
Reviewed-on: #198 Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
3a23ab5f36
@ -177,7 +177,7 @@ public class TeamCommand extends BasicCommand {
|
||||
if(checkTeamName(player, team, args[2]))
|
||||
return;
|
||||
|
||||
Team.create(args[1], args[2], user.getId());
|
||||
Team.create(args[1], args[2], user);
|
||||
user.setTeam(Team.get(args[1]).getTeamId());
|
||||
Message.send("TEAM_CREATE_CREATED", player, args[2]);
|
||||
}
|
||||
|
@ -52,8 +52,9 @@ public class Team {
|
||||
this(rs.getInt("TeamID"), rs.getString("TeamKuerzel"), rs.getString("TeamName"), rs.getString("TeamColor"));
|
||||
}
|
||||
|
||||
public static void create(String kuerzel, String name, int leader){
|
||||
SQL.update("INSERT INTO Team (TeamKuerzel, TeamName, TeamLeader) VALUES (?, ?, ?)", kuerzel, name, leader);
|
||||
public static void create(String kuerzel, String name, SteamwarUser user){
|
||||
user.setLeader(true);
|
||||
SQL.update("INSERT INTO Team (TeamKuerzel, TeamName) VALUES (?, ?)", kuerzel, name);
|
||||
}
|
||||
|
||||
public static Team get(int id){
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren