mirror of
https://github.com/PikaMug/Quests.git
synced 2024-09-09 14:08:02 +02:00
Prevent crashes from /questadmin reset, fixes #799
This commit is contained in:
parent
583c366c23
commit
98c76468db
@ -1338,9 +1338,9 @@ public class CmdExecutor implements CommandExecutor {
|
||||
}
|
||||
UUID id = quester.getUUID();
|
||||
LinkedList<Quester> temp = plugin.getQuesters();
|
||||
for (Quester q : temp) {
|
||||
if (q.getUUID().equals(id)) {
|
||||
temp.remove(q);
|
||||
for(Iterator<Quester> 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<Quester> temp2 = plugin.getQuesters();
|
||||
temp.add(quester);
|
||||
temp2.add(quester);
|
||||
plugin.setQuesters(temp2);
|
||||
} else {
|
||||
cs.sendMessage(ChatColor.RED + Lang.get("NoPermission"));
|
||||
|
Loading…
Reference in New Issue
Block a user