mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-05 18:29:34 +01:00
Fix tests, and caught NPE
This commit is contained in:
parent
939a2e8b1f
commit
156e7ce373
@ -64,6 +64,9 @@ public class ImportCommand extends MultiverseCommand {
|
||||
|
||||
private String getPotentialWorlds() {
|
||||
File worldFolder = this.plugin.getServer().getWorldContainer();
|
||||
if (worldFolder == null) {
|
||||
return "";
|
||||
}
|
||||
File[] files = worldFolder.listFiles();
|
||||
String worldList = "";
|
||||
Collection<MultiverseWorld> worlds = this.worldManager.getMVWorlds();
|
||||
|
@ -84,7 +84,7 @@ public class TestWorldStuff {
|
||||
// Import the first world. The world folder does not exist.
|
||||
plugin.onCommand(mockCommandSender, mockCommand, "", normalArgs);
|
||||
verify(mockCommandSender).sendMessage(ChatColor.RED + "FAILED.");
|
||||
verify(mockCommandSender).sendMessage("That world folder does not exist...");
|
||||
verify(mockCommandSender).sendMessage("That world folder does not exist. These look like worlds to me:");
|
||||
|
||||
// We should still have no worlds.
|
||||
assertEquals(0, creator.getCore().getMVWorldManager().getMVWorlds().size());
|
||||
|
Loading…
Reference in New Issue
Block a user