geforkt von SteamWar/BungeeCore
Merge branch 'master' into ModDetection1.13+
Dieser Commit ist enthalten in:
Commit
6dc33c85dd
@ -146,6 +146,7 @@ public class Team {
|
||||
user.setLeader(false);
|
||||
delete.update(teamId);
|
||||
teamCache.remove(this);
|
||||
TeamTeilnahme.deleteFuture(teamId);
|
||||
}
|
||||
|
||||
public List<Integer> getMembers(){
|
||||
|
@ -28,6 +28,7 @@ public class TeamTeilnahme {
|
||||
|
||||
private static final Statement insert = new Statement("INSERT INTO TeamTeilnahme (TeamID, EventID) VALUES (?, ?)");
|
||||
private static final Statement delete = new Statement("DELETE FROM TeamTeilnahme WHERE TeamID = ? AND EventID = ?");
|
||||
private static final Statement deleteFuture = new Statement("DELETE FROM TeamTeilnahme t WHERE t.TeamID = ? AND (SELECT e.Start FROM Event e WHERE e.EventID = t.EventID) > NOW()");
|
||||
private static final Statement byEventTeam = new Statement("SELECT * FROM TeamTeilnahme WHERE TeamID = ? AND EventID = ?");
|
||||
private static final Statement byEvent = new Statement("SELECT * FROM TeamTeilnahme WHERE EventID = ?");
|
||||
private static final Statement byTeam = new Statement("SELECT * FROM TeamTeilnahme WHERE TeamID = ?");
|
||||
@ -44,6 +45,10 @@ public class TeamTeilnahme {
|
||||
return byEventTeam.select(ResultSet::next, teamID, eventID);
|
||||
}
|
||||
|
||||
public static void deleteFuture(int teamID) {
|
||||
deleteFuture.update(teamID);
|
||||
}
|
||||
|
||||
public static Set<Team> getTeams(int eventID){
|
||||
return byEvent.select(rs -> {
|
||||
Set<Team> teams = new HashSet<>();
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren