use of com.sk89q.worldguard.protection.managers.storage.StorageException in project WorldGuard by EngineHub.
the class RegionContainerImpl method unload.
/**
* Unload the region manager associated with the given world name.
*
* <p>If no region manager has been loaded for the given name, then
* nothing will happen.</p>
*
* @param name the name of the world
*/
public void unload(String name) {
checkNotNull(name);
Normal normal = Normal.normal(name);
synchronized (lock) {
RegionManager manager = mapping.get(normal);
if (manager != null) {
try {
manager.save();
} catch (StorageException e) {
log.log(Level.WARNING, "Failed to save the region data for '" + name + "'", e);
}
mapping.remove(normal);
failingSaves.remove(manager);
}
failingLoads.remove(normal);
}
}
Aggregations