diff --git a/src/com/onarandombox/MultiverseCore/MultiverseCore.java b/src/com/onarandombox/MultiverseCore/MultiverseCore.java index 3ac05471..907ad965 100644 --- a/src/com/onarandombox/MultiverseCore/MultiverseCore.java +++ b/src/com/onarandombox/MultiverseCore/MultiverseCore.java @@ -653,7 +653,7 @@ public class MultiverseCore extends JavaPlugin { try { return Environment.valueOf(env); } catch (IllegalArgumentException e) { - return Environment.NORMAL; + return null; } } diff --git a/src/com/onarandombox/MultiverseCore/command/commands/CreateCommand.java b/src/com/onarandombox/MultiverseCore/command/commands/CreateCommand.java index 89eeac4a..b132fec1 100644 --- a/src/com/onarandombox/MultiverseCore/command/commands/CreateCommand.java +++ b/src/com/onarandombox/MultiverseCore/command/commands/CreateCommand.java @@ -44,6 +44,11 @@ public class CreateCommand extends BaseCommand { } Environment environment = this.plugin.getEnvFromString(env); + if(environment == null) { + sender.sendMessage(ChatColor.RED + "That is not a valid environment."); + EnvironmentCommand.showEnvironments(sender); + return; + } sender.sendMessage(ChatColor.AQUA + "Starting world creation..."); if (this.plugin.addWorld(worldName, environment, seed, generator)) { sender.sendMessage(ChatColor.GREEN + "Complete!"); diff --git a/src/com/onarandombox/MultiverseCore/command/commands/EnvironmentCommand.java b/src/com/onarandombox/MultiverseCore/command/commands/EnvironmentCommand.java index e5cc903f..d93d61b2 100644 --- a/src/com/onarandombox/MultiverseCore/command/commands/EnvironmentCommand.java +++ b/src/com/onarandombox/MultiverseCore/command/commands/EnvironmentCommand.java @@ -22,10 +22,10 @@ public class EnvironmentCommand extends BaseCommand{ @Override public void execute(CommandSender sender, String[] args) { - this.showEnvironments(sender); + EnvironmentCommand.showEnvironments(sender); } - public void showEnvironments(CommandSender sender) { + public static void showEnvironments(CommandSender sender) { sender.sendMessage(ChatColor.YELLOW + "Valid Environments are:"); sender.sendMessage(ChatColor.GREEN + "NORMAL"); sender.sendMessage(ChatColor.RED + "NETHER"); diff --git a/src/com/onarandombox/MultiverseCore/command/commands/ImportCommand.java b/src/com/onarandombox/MultiverseCore/command/commands/ImportCommand.java index 04e56108..3b1d3e1e 100644 --- a/src/com/onarandombox/MultiverseCore/command/commands/ImportCommand.java +++ b/src/com/onarandombox/MultiverseCore/command/commands/ImportCommand.java @@ -38,6 +38,11 @@ public class ImportCommand extends BaseCommand { String env = args[1]; Environment environment = this.plugin.getEnvFromString(env); + if(environment == null) { + sender.sendMessage(ChatColor.RED + "That is not a valid environment."); + EnvironmentCommand.showEnvironments(sender); + return; + } if (new File(worldName).exists() && env != null) { sender.sendMessage(ChatColor.AQUA + "Starting world import..."); diff --git a/src/defaults/config.yml b/src/defaults/config.yml index 7f87c8b7..c0675258 100644 --- a/src/defaults/config.yml +++ b/src/defaults/config.yml @@ -1,10 +1,13 @@ -# True/False - Whether MultiVerse should handle all respawns on every World including the Default. -# Disable this if you have a form of Respawn Teleportation plugin. -globalrespawn: false +# !!!This only applies to worlds being handled by Multiverse!!! +# If you don't see it using /mvlist this setting WILL HAVE NO EFFECT +# Valid values are: +# all: If you die in a Nether an attempt will be made to spawn you in the corresponding Normal world, if not you go to defaultspawnworld +# default: If you die in a Nether you will respawn in the world defined below in defaultspawnworld +# none: You will always respawn in the same world you died in +notchrespawnstyle: none -# True/False - Whether MultiVerse should handle all respawns on the MultiVerse Worlds. -# If 'globalrespawn:true' then this will have no effect. -alternaterespawn: true +# +defaultspawnworld: world # How long to leave in between sending a message to the player. # In Milliseconds - Default is '5000' which is 5 Seconds. @@ -20,8 +23,8 @@ portalcooldown: 5000 # won't touch your chat worldnameprefix: true -# If Multiverse does not find permissions should it automattically fall back to +# If Multiverse does not find permissions should it automatically fall back to # people defined in ops.txt? Remember, if you use ops based permissions # the awesome Multiverse devs get to decide which commands require op! -# (Which is why we highly recomend a permissions plugin! You shouldn't trust us this much...) +# (Which is why we highly recommend a permissions plugin! You shouldn't trust us this much...) opfallback: true \ No newline at end of file