mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-07 03:11:02 +01:00
Merge branch 'master' of github.com:Multiverse/Multiverse-Core
This commit is contained in:
commit
ea920c1252
@ -256,7 +256,7 @@ public class MultiverseCore extends JavaPlugin implements MVPlugin, Core {
|
||||
public void loadConfigs() {
|
||||
// Now grab the Configuration Files.
|
||||
this.multiverseConfig = YamlConfiguration.loadConfiguration(new File(getDataFolder(), "config.yml"));
|
||||
Configuration coreDefaults = YamlConfiguration.loadConfiguration(this.getClass().getResourceAsStream(File.separator + "defaults" + File.separator + "config.yml"));
|
||||
Configuration coreDefaults = YamlConfiguration.loadConfiguration(this.getClass().getResourceAsStream("/defaults/config.yml"));
|
||||
this.multiverseConfig.setDefaults(coreDefaults);
|
||||
this.multiverseConfig.options().copyDefaults(true);
|
||||
this.worldManager.loadWorldConfig(new File(getDataFolder(), "worlds.yml"));
|
||||
|
@ -197,11 +197,9 @@ public class WorldManager implements MVWorldManager {
|
||||
*/
|
||||
public Boolean deleteWorld(String name) {
|
||||
|
||||
if (this.plugin.getServer().getWorld(name) != null) {
|
||||
if (!unloadWorldFromBukkit(name, false)) {
|
||||
// If the world was loaded, and we couldn't unload it, return false. DON"T DELTEE
|
||||
return false;
|
||||
}
|
||||
if (this.plugin.getServer().getWorld(name) == null) {
|
||||
// We can only delete loaded worlds
|
||||
return false;
|
||||
}
|
||||
removeWorldFromConfig(name);
|
||||
try {
|
||||
@ -225,6 +223,7 @@ public class WorldManager implements MVWorldManager {
|
||||
this.plugin.log(Level.SEVERE, "rm " + worldFile.getAbsolutePath());
|
||||
return false;
|
||||
}
|
||||
plugin.log(Level.FINER, "deleteWorld(): worldFile: " + worldFile.getAbsolutePath());
|
||||
boolean deletedWorld = FileUtils.deleteFolder(worldFile);
|
||||
if (deletedWorld) {
|
||||
this.plugin.log(Level.INFO, "World " + name + " was DELETED.");
|
||||
|
Loading…
Reference in New Issue
Block a user