diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/AfkManager.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/AfkManager.java index 0fb8799..cb8c1ab 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/AfkManager.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/modules/AfkManager.java @@ -54,7 +54,7 @@ public class AfkManager extends BukkitRunnable implements Listener { public void run() { // methode exécutée toute les secondes Collection oPlayers = OnlinePlayerManager.getInstance().getAll(); - for (OnlinePlayer ap : oPlayers) + for (OnlinePlayer ap : oPlayers.toArray(new OnlinePlayer[oPlayers.size()])) { // parcours de tout les joueurs if (ap == null) continue; diff --git a/src/net/mc_pandacraft/java/plugin/pandacraftutils/players/OnlinePlayerManager.java b/src/net/mc_pandacraft/java/plugin/pandacraftutils/players/OnlinePlayerManager.java index 596d560..d01706c 100644 --- a/src/net/mc_pandacraft/java/plugin/pandacraftutils/players/OnlinePlayerManager.java +++ b/src/net/mc_pandacraft/java/plugin/pandacraftutils/players/OnlinePlayerManager.java @@ -1,7 +1,6 @@ package net.mc_pandacraft.java.plugin.pandacraftutils.players; import java.util.Collection; -import java.util.Collections; import java.util.HashMap; import net.mc_pandacraft.java.plugin.pandacraftutils.PandacraftUtils; @@ -81,7 +80,7 @@ public final class OnlinePlayerManager implements Listener { } public Collection getAll() { - return Collections.unmodifiableCollection(players.values()); + return players.values(); }