SteamWar/MissileWars
Archiviert
13
0

Fix JoinListener.joinEvent
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2024-08-03 14:42:49 +02:00
Ursprung b5db2a4c70
Commit 38475d75ec

Datei anzeigen

@ -57,11 +57,15 @@ public class JoinListener extends BasicListener {
}
private static void joinEvent(Player p) {
if (Config.EventTeamRedID == Config.EventTeamBlueID) {
if (Config.EventTeamRedID == 0 && Config.EventTeamBlueID == 0) {
joinNormal(p);
return;
}
int teamId = SteamwarUser.get(p.getUniqueId()).getTeam();
if (teamId != Config.EventTeamRedID && teamId != Config.EventTeamBlueID) {
teamId = 0;
}
if (teamId == Config.EventTeamRedID && MissileWars.getRedTeam().size() < Config.MaximumTeamMembers) {
MissileWars.getRedTeam().join(p);
} else if (teamId == Config.EventTeamBlueID && MissileWars.getBlueTeam().size() < Config.MaximumTeamMembers) {