Implement reset after win! #36
@ -161,6 +161,11 @@ public class MWTeam {
|
|||||||
MissileWars.end(WinReasons.NO_ENEMY, enemy());
|
MissileWars.end(WinReasons.NO_ENEMY, enemy());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void reset() {
|
||||||
|
players.clear();
|
||||||
|
openInvitations.clear();
|
||||||
|
}
|
||||||
|
|
||||||
public void invitePlayer(Player p) {
|
public void invitePlayer(Player p) {
|
||||||
if (enemy().openInvitations.contains(p)) return;
|
if (enemy().openInvitations.contains(p)) return;
|
||||||
openInvitations.add(p);
|
openInvitations.add(p);
|
||||||
|
@ -93,8 +93,8 @@ public class MissileWars extends JavaPlugin {
|
|||||||
fightState = FightState.WAITING;
|
fightState = FightState.WAITING;
|
||||||
StateDependent.setupState(fightState);
|
StateDependent.setupState(fightState);
|
||||||
|
|
||||||
redTeam = new MWTeam(ChatColor.RED, Config.RedSpawn, "Rot", Config.RedPortalZ);
|
redTeam.reset();
|
||||||
YoyoNow markierte diese Unterhaltung als gelöst
Veraltet
|
|||||||
blueTeam = new MWTeam(ChatColor.DARK_AQUA, Config.BlueSpawn, "Blau", Config.BluePortalZ);
|
blueTeam.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Bin nicht ganz so ein Fan von der Reset-Methode, besser wäre eine reset-Funktion, welche einfach nur das nötige Zurücksetzt.