mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-22 10:36:06 +01:00
Getting the generator is now wrapped in a try block.
The Bukkit API calls a plugin method. If that method throws exceptions, they fall through right into our face and then Bukkit blames us. Not good. Thanks andrewkm for mentioning this.
This commit is contained in:
parent
eff56f74da
commit
4043d5abcb
@ -370,8 +370,15 @@ public class WorldManager implements MVWorldManager {
|
||||
if (type != null) {
|
||||
creator.type(type);
|
||||
}
|
||||
if ((world.getGenerator() != null) && (!world.getGenerator().equals("null")))
|
||||
creator.generator(world.getGenerator());
|
||||
if ((world.getGenerator() != null) && (!world.getGenerator().equals("null"))) {
|
||||
try {
|
||||
creator.generator(world.getGenerator());
|
||||
} catch (Throwable t) {
|
||||
Logging.warning("Failed to set the generator for world '%s' to '%s': %s", name, world.getGenerator(), t);
|
||||
Logging.warning("World '%s' was NOT loaded!", name);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return doLoad(creator, ignoreExists);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user