Added package-private method for setting MVWorld plugin and name. Fixes #923.

This commit is contained in:
Jeremy Wood 2012-11-05 13:08:37 -05:00
parent f210851294
commit b888561d98
2 changed files with 6 additions and 0 deletions

View File

@ -511,6 +511,11 @@ public class MVWorld extends SerializationConfig implements MultiverseWorld {
}
}
void setPluginAndWorld(MultiverseCore plugin, String name) {
this.plugin = plugin;
this.name = name;
}
/**
* {@inheritDoc}
*/

View File

@ -574,6 +574,7 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
this.log(Level.FINE, "Migrating: " + entry.getKey());
// we have to migrate this
MVWorld world = new MVWorld(Collections.EMPTY_MAP);
world.setPluginAndWorld(this, entry.getKey());
ConfigurationSection section = (ConfigurationSection) entry.getValue();
// migrate animals and monsters