Finally fixed warmup bug.

This commit is contained in:
Boos 2012-08-19 13:20:45 +02:00
parent 36eb94ebdd
commit 5c526662b6

View File

@ -75,10 +75,18 @@ public class boosWarmUpManager {
Iterator<String> iter = playercommands.keySet().iterator(); Iterator<String> iter = playercommands.keySet().iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
if (iter.next().startsWith(player.getName() + "@")) { if (iter.next().startsWith(player.getName() + "@")) {
killTimer(player);
iter.remove(); iter.remove();
} }
} }
} }
public static void killTimer(Player player) {
for (String key : playercommands.keySet()) {
if (key.startsWith(player.getName() + "@")) {
playercommands.get(key).cancel();
}
}
}
public static boolean hasWarmUps(Player player) { public static boolean hasWarmUps(Player player) {
for (String key : playercommands.keySet()) { for (String key : playercommands.keySet()) {