Fixed ConcurrentModificationException on world unload

This commit is contained in:
bm01 2012-06-27 20:39:54 +02:00
parent 71b20bdeaa
commit bdcc522897
2 changed files with 6 additions and 4 deletions

View File

@ -12,6 +12,7 @@ Version 1.3.10-dev
+ Added ability for custom blocks to drop a range of items.
+ Added Ability API functions
+ Added 50% & 150% XP boost perks
= Fixed ConcurrentModificationException on world unload
= Fixed players never being removed from memory (memory leak)
= Fixed admin chat being seen by everyone
= Fixed issue with UTFDataFormatException occurring on occasion when trying to load Chunklets

View File

@ -10,6 +10,7 @@ import java.io.ObjectOutputStream;
import java.io.StreamCorruptedException;
import java.io.UTFDataFormatException;
import java.util.HashMap;
import java.util.Iterator;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
@ -86,10 +87,10 @@ public class HashChunkletManager implements ChunkletManager {
String worldName = world.getName();
for(String key : store.keySet()) {
String tempWorldName = key.split(",")[0];
for(Iterator<String> it = store.keySet().iterator() ; it.hasNext() ; ) {
String tempWorldName = it.next().split(",")[0];
if(tempWorldName.equals(worldName)) {
store.remove(key);
it.remove();
}
}
}