Fixed Team Leader is Member
Dieser Commit ist enthalten in:
Ursprung
dc49ddff4d
Commit
2a16c8c66b
@ -177,7 +177,7 @@ public class TeamCommand extends BasicCommand {
|
|||||||
if(checkTeamName(player, team, args[2]))
|
if(checkTeamName(player, team, args[2]))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Team.create(args[1], args[2], user.getId());
|
Team.create(args[1], args[2], user);
|
||||||
user.setTeam(Team.get(args[1]).getTeamId());
|
user.setTeam(Team.get(args[1]).getTeamId());
|
||||||
Message.send("TEAM_CREATE_CREATED", player, args[2]);
|
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"));
|
this(rs.getInt("TeamID"), rs.getString("TeamKuerzel"), rs.getString("TeamName"), rs.getString("TeamColor"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void create(String kuerzel, String name, int leader){
|
public static void create(String kuerzel, String name, SteamwarUser user){
|
||||||
SQL.update("INSERT INTO Team (TeamKuerzel, TeamName, TeamLeader) VALUES (?, ?, ?)", kuerzel, name, leader);
|
user.setLeader(true);
|
||||||
|
SQL.update("INSERT INTO Team (TeamKuerzel, TeamName) VALUES (?, ?)", kuerzel, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Team get(int id){
|
public static Team get(int id){
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren