diff --git a/main/src/main/java/me/blackvein/quests/listeners/CmdExecutor.java b/main/src/main/java/me/blackvein/quests/listeners/CmdExecutor.java index c897c1cd2..20f0f67b7 100644 --- a/main/src/main/java/me/blackvein/quests/listeners/CmdExecutor.java +++ b/main/src/main/java/me/blackvein/quests/listeners/CmdExecutor.java @@ -1338,9 +1338,9 @@ public class CmdExecutor implements CommandExecutor { } UUID id = quester.getUUID(); LinkedList temp = plugin.getQuesters(); - for (Quester q : temp) { - if (q.getUUID().equals(id)) { - temp.remove(q); + for(Iterator itr = temp.iterator(); itr.hasNext();) { + if (itr.next().getUUID().equals(id)) { + itr.remove(); } } plugin.setQuesters(temp); @@ -1366,7 +1366,7 @@ public class CmdExecutor implements CommandExecutor { quester.setUUID(id); quester.saveData(); LinkedList temp2 = plugin.getQuesters(); - temp.add(quester); + temp2.add(quester); plugin.setQuesters(temp2); } else { cs.sendMessage(ChatColor.RED + Lang.get("NoPermission"));