for (File worldFolder : Bukkit.getWorldContainer().listFiles()) {
if ((new File(worldFolder, "spout_meta/worldItemMap.txt")).exists()) {
World world = Bukkit.getWorld(worldFolder.getName());
if (world != null) {
ItemMap worldItemMap = SpoutManager.getChunkDataManager().getItemMap(world);
if (worldItemMap != null) {
worldItemMap.rename(fullOldKey, fullNewKey);
continue;
}
}
FlatFileStore<Integer> fs = new FlatFileStore<Integer>(new File(worldFolder, "spout_meta/worldItemMap.txt"), Integer.class);
fs.load();
ItemMap worldItemMap = new ItemMap(ItemMap.getRootMap(), fs, null);
worldItemMap.rename(fullOldKey, fullNewKey);
}
}
}