mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-25 12:05:14 +01:00
Working on issue #10
This commit is contained in:
parent
04a76b1eb2
commit
8cb421b27a
@ -46,10 +46,10 @@ import com.onarandombox.MultiverseCore.command.commands.CoordCommand;
|
||||
import com.onarandombox.MultiverseCore.command.commands.HelpCommand;
|
||||
import com.onarandombox.MultiverseCore.command.commands.ListCommand;
|
||||
import com.onarandombox.MultiverseCore.command.commands.CreateCommand;
|
||||
import com.onarandombox.MultiverseCore.command.commands.ImportCommand;
|
||||
import com.onarandombox.MultiverseCore.command.commands.SetSpawnCommand;
|
||||
import com.onarandombox.MultiverseCore.command.commands.WhoCommand;
|
||||
import com.onarandombox.MultiverseCore.command.commands.TeleportCommand;
|
||||
import com.onarandombox.MultiverseCore.commands.MVImport;
|
||||
import com.onarandombox.MultiverseCore.commands.MVModify;
|
||||
import com.onarandombox.MultiverseCore.commands.MVReload;
|
||||
import com.onarandombox.MultiverseCore.commands.MVRemove;
|
||||
@ -296,6 +296,7 @@ public class MultiverseCore extends JavaPlugin {
|
||||
commandManager.addCommand(new WhoCommand(this));
|
||||
commandManager.addCommand(new SetSpawnCommand(this));
|
||||
commandManager.addCommand(new CreateCommand(this));
|
||||
commandManager.addCommand(new ImportCommand(this));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -303,7 +304,7 @@ public class MultiverseCore extends JavaPlugin {
|
||||
*/
|
||||
private void setupCommands() {
|
||||
// commands.put("mvcreate", new CreateCommand(this));
|
||||
commands.put("mvimport", new MVImport(this));
|
||||
// commands.put("mvimport", new ImportCommand(this));
|
||||
commands.put("mvremove", new MVRemove(this));
|
||||
commands.put("mvmodify", new MVModify(this));
|
||||
// commands.put("mvtp", new TeleportCommand(this));
|
||||
|
@ -44,15 +44,15 @@ public class CreateCommand extends BaseCommand {
|
||||
sender.sendMessage(ChatColor.GREEN + "worldName" + ChatColor.WHITE + worldName);
|
||||
sender.sendMessage(ChatColor.GREEN + "env " + ChatColor.WHITE + env);
|
||||
sender.sendMessage(ChatColor.GREEN + "seed " + ChatColor.WHITE + seed);
|
||||
|
||||
if (args.length < 2) {
|
||||
sender.sendMessage("Not enough parameters to create a new world");
|
||||
sender.sendMessage(ChatColor.RED + "/mvcreate {WORLDNAME} {ENVIRONMENT} - Create a new World.");
|
||||
sender.sendMessage(ChatColor.RED + "Example - /mvcreate world NORMAL");
|
||||
sender.sendMessage(ChatColor.RED + "Example - /mvcreate airworld SKYLANDS");
|
||||
sender.sendMessage(ChatColor.RED + "Example - /mvcreate hellworld NETHER");
|
||||
return;
|
||||
}
|
||||
// This is unreachable code, will remove next commit
|
||||
// if (args.length < 2) {
|
||||
// sender.sendMessage("Not enough parameters to create a new world");
|
||||
// sender.sendMessage(ChatColor.RED + "/mvcreate {WORLDNAME} {ENVIRONMENT} - Create a new World.");
|
||||
// sender.sendMessage(ChatColor.RED + "Example - /mvcreate world NORMAL");
|
||||
// sender.sendMessage(ChatColor.RED + "Example - /mvcreate airworld SKYLANDS");
|
||||
// sender.sendMessage(ChatColor.RED + "Example - /mvcreate hellworld NETHER");
|
||||
// return;
|
||||
// }
|
||||
if (new File(worldName).exists() || this.plugin.worlds.containsKey(worldName)) {
|
||||
sender.sendMessage(ChatColor.RED + "A Folder/World already exists with this name!");
|
||||
sender.sendMessage(ChatColor.RED + "If you are confident it is a world you can import with /mvimport");
|
||||
|
@ -0,0 +1,28 @@
|
||||
package com.onarandombox.MultiverseCore.command.commands;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MVCommandHandler;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import com.onarandombox.MultiverseCore.command.BaseCommand;
|
||||
|
||||
public class ImportCommand extends BaseCommand {
|
||||
|
||||
public ImportCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
name = "Import World";
|
||||
description = "Imports a new world of the specified type";
|
||||
usage = "/mvimport" + ChatColor.GREEN + " {NAME} {TYPE}";
|
||||
minArgs = 2;
|
||||
maxArgs = 2;
|
||||
identifiers.add("mvimport");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package com.onarandombox.MultiverseCore.commands;
|
||||
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import com.onarandombox.MultiverseCore.MVCommandHandler;
|
||||
import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
|
||||
public class MVImport extends MVCommandHandler {
|
||||
|
||||
public MVImport(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean perform(CommandSender sender, String[] args) {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user