mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-09-06 12:38:07 +02:00
Environments no longer default to Normal, Closes #24
This commit is contained in:
parent
ea45d2675e
commit
eceeb72b59
@ -653,7 +653,7 @@ public class MultiverseCore extends JavaPlugin {
|
||||
try {
|
||||
return Environment.valueOf(env);
|
||||
} catch (IllegalArgumentException e) {
|
||||
return Environment.NORMAL;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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!");
|
||||
|
@ -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");
|
||||
|
@ -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...");
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user