mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-22 10:36:06 +01:00
ImportCommand now checks if the world was successfully imported.
Fixes #359
This commit is contained in:
parent
47e052d180
commit
07247a1afd
@ -143,8 +143,10 @@ public class ImportCommand extends MultiverseCommand {
|
||||
|
||||
if (worldFile.exists() && env != null) {
|
||||
Command.broadcastCommandMessage(sender, "Starting import of world '" + worldName + "'...");
|
||||
this.worldManager.addWorld(worldName, environment, null, generator, useSpawnAdjust);
|
||||
Command.broadcastCommandMessage(sender, "Complete!");
|
||||
if (this.worldManager.addWorld(worldName, environment, null, generator, useSpawnAdjust))
|
||||
Command.broadcastCommandMessage(sender, ChatColor.GREEN + "Complete!");
|
||||
else
|
||||
Command.broadcastCommandMessage(sender, ChatColor.RED + "Failed!");
|
||||
} else if (env == null) {
|
||||
sender.sendMessage(ChatColor.RED + "FAILED.");
|
||||
sender.sendMessage("That world environment did not exist.");
|
||||
|
@ -131,7 +131,7 @@ public class TestWorldStuff {
|
||||
verify(mockCommandSender).sendMessage("Starting import of world 'world'...");
|
||||
verify(mockCommandSender).sendMessage("Starting import of world 'world_nether'...");
|
||||
verify(mockCommandSender).sendMessage("Starting import of world 'world_the_end'...");
|
||||
verify(mockCommandSender, VerificationModeFactory.times(3)).sendMessage("Complete!");
|
||||
verify(mockCommandSender, VerificationModeFactory.times(3)).sendMessage(ChatColor.GREEN + "Complete!");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user