mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-22 10:36:06 +01:00
Consistant punctuation on descriptions of commands.
/mvspawn's description altered Testing my ability to commit changes on GitHub.
This commit is contained in:
parent
8f56347572
commit
fda6b31f06
@ -11,20 +11,20 @@ import com.onarandombox.MultiverseCore.command.BaseCommand;
|
||||
import com.onarandombox.MultiverseCore.command.CommandManager;
|
||||
|
||||
public class CreateCommand extends BaseCommand {
|
||||
|
||||
|
||||
public CreateCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.name = "Create World";
|
||||
this.description = "Creates a new world of the specified type";
|
||||
this.description = "Creates a new world of the specified type.";
|
||||
this.usage = "/mvcreate" + ChatColor.GREEN + " {NAME} {ENV}" + ChatColor.GOLD + " -s [SEED] -g [GENERATOR[:ID]]";
|
||||
this.minArgs = 2;
|
||||
this.maxArgs = 6;
|
||||
this.identifiers.add("mvcreate");
|
||||
this.permission = "multiverse.world.create";
|
||||
this.requiresOp = true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
if (args.length % 2 != 0) {
|
||||
@ -35,13 +35,13 @@ public class CreateCommand extends BaseCommand {
|
||||
String env = args[1];
|
||||
String seed = CommandManager.getFlag("-s", args);
|
||||
String generator = CommandManager.getFlag("-g", args);
|
||||
|
||||
|
||||
if (new File(worldName).exists() || this.plugin.isMVWorld(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");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Environment environment = this.plugin.getEnvFromString(env);
|
||||
if (environment == null) {
|
||||
sender.sendMessage(ChatColor.RED + "That is not a valid environment.");
|
||||
|
@ -7,11 +7,11 @@ import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import com.onarandombox.MultiverseCore.command.BaseCommand;
|
||||
|
||||
public class EnvironmentCommand extends BaseCommand{
|
||||
|
||||
|
||||
public EnvironmentCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.name = "List Environments";
|
||||
this.description = "Lists valid known environments";
|
||||
this.description = "Lists valid known environments.";
|
||||
this.usage = "/mvenv";
|
||||
this.minArgs = 0;
|
||||
this.maxArgs = 0;
|
||||
@ -24,12 +24,12 @@ public class EnvironmentCommand extends BaseCommand{
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
EnvironmentCommand.showEnvironments(sender);
|
||||
}
|
||||
|
||||
|
||||
public static void showEnvironments(CommandSender sender) {
|
||||
sender.sendMessage(ChatColor.YELLOW + "Valid Environments are:");
|
||||
sender.sendMessage(ChatColor.GREEN + "NORMAL");
|
||||
sender.sendMessage(ChatColor.RED + "NETHER");
|
||||
sender.sendMessage(ChatColor.AQUA + "SKYLANDS");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Copyright (C) 2011 DThielke <dave.thielke@gmail.com>
|
||||
*
|
||||
*
|
||||
* This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/3.0/ or send a letter to
|
||||
* Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
|
||||
@ -22,7 +22,7 @@ public class HelpCommand extends BaseCommand {
|
||||
public HelpCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.name = "Help";
|
||||
this.description = "Displays the help menu";
|
||||
this.description = "Displays the help menu.";
|
||||
this.usage = ChatColor.AQUA + "/mv help " + ChatColor.GOLD + "[page#]";
|
||||
this.minArgs = 0;
|
||||
this.maxArgs = 1;
|
||||
@ -61,7 +61,7 @@ public class HelpCommand extends BaseCommand {
|
||||
}
|
||||
for (int c = start; c < end; c++) {
|
||||
BaseCommand cmd = commands.get(c);
|
||||
|
||||
|
||||
sender.sendMessage(ChatColor.AQUA + " " + cmd.getUsage());
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ public class ImportCommand extends BaseCommand {
|
||||
public ImportCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.name = "Import World";
|
||||
this.description = "Imports a new world of the specified type";
|
||||
this.description = "Imports a new world of the specified type.";
|
||||
this.usage = "/mvimport" + ChatColor.GREEN + " {NAME} {ENV} " + ChatColor.GOLD + "[GENERATOR[:ID]]";
|
||||
this.minArgs = 2;
|
||||
this.maxArgs = 3;
|
||||
@ -30,12 +30,12 @@ public class ImportCommand extends BaseCommand {
|
||||
sender.sendMessage(ChatColor.RED + "Multiverse already knows about this world!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
String generator = null;
|
||||
if(args.length == 3) {
|
||||
generator = args[2];
|
||||
}
|
||||
|
||||
|
||||
String env = args[1];
|
||||
Environment environment = this.plugin.getEnvFromString(env);
|
||||
if(environment == null) {
|
||||
@ -43,7 +43,7 @@ public class ImportCommand extends BaseCommand {
|
||||
EnvironmentCommand.showEnvironments(sender);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (new File(worldName).exists() && env != null) {
|
||||
sender.sendMessage(ChatColor.AQUA + "Starting world import...");
|
||||
this.plugin.addWorld(worldName, environment, null, generator);
|
||||
|
@ -10,11 +10,11 @@ import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import com.onarandombox.MultiverseCore.command.BaseCommand;
|
||||
|
||||
public class ListCommand extends BaseCommand {
|
||||
|
||||
|
||||
public ListCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.name = "World Listing";
|
||||
this.description = "Displays a listing of all worlds that you can enter";
|
||||
this.description = "Displays a listing of all worlds that you can enter.";
|
||||
this.usage = "/mvlist";
|
||||
this.minArgs = 0;
|
||||
this.maxArgs = 0;
|
||||
@ -22,21 +22,21 @@ public class ListCommand extends BaseCommand {
|
||||
this.permission = "multiverse.world.list";
|
||||
this.requiresOp = false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
Player p = null;
|
||||
if (sender instanceof Player) {
|
||||
p = (Player) sender;
|
||||
}
|
||||
|
||||
|
||||
String output = ChatColor.LIGHT_PURPLE + "Worlds which you can view:\n";
|
||||
for (MVWorld world : this.plugin.getMVWorlds()) {
|
||||
|
||||
|
||||
if (p != null && (!this.plugin.ph.canEnterWorld(p, world.getCBWorld()))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
ChatColor color = ChatColor.GOLD;
|
||||
Environment env = world.getEnvironment();
|
||||
if (env == Environment.NETHER) {
|
||||
@ -51,7 +51,7 @@ public class ListCommand extends BaseCommand {
|
||||
worldName = world.getAliasColor() + world.getAlias() + ChatColor.WHITE;
|
||||
}
|
||||
output += ChatColor.WHITE + worldName + " - " + color + world.getEnvironment() + " \n";
|
||||
|
||||
|
||||
}
|
||||
String[] response = output.split("\n");
|
||||
for (String msg : response) {
|
||||
|
@ -14,11 +14,11 @@ import com.onarandombox.MultiverseCore.command.BaseCommand;
|
||||
// Anything not in here will only support the SET action
|
||||
|
||||
public class ModifyAddCommand extends BaseCommand {
|
||||
|
||||
|
||||
public ModifyAddCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.name = "Modify a World (Add a value)";
|
||||
this.description = "Modify various aspects of worlds. See the help wiki for how to use this command properly. If you do not include a world, the current world will be used";
|
||||
this.description = "Modify various aspects of worlds. See the help wiki for how to use this command properly. If you do not include a world, the current world will be used.";
|
||||
this.usage = "/mvmodify " + ChatColor.GREEN + "ADD {VALUE} {PROPERTY}" + ChatColor.GOLD + " [WORLD] ";
|
||||
this.minArgs = 3;
|
||||
this.maxArgs = 4;
|
||||
@ -26,7 +26,7 @@ public class ModifyAddCommand extends BaseCommand {
|
||||
this.permission = "multiverse.world.modify";
|
||||
this.requiresOp = true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
// We NEED a world from the command line
|
||||
@ -34,7 +34,7 @@ public class ModifyAddCommand extends BaseCommand {
|
||||
if (!(sender instanceof Player)) {
|
||||
p = (Player) sender;
|
||||
}
|
||||
|
||||
|
||||
if (args.length == 3 && p == null) {
|
||||
sender.sendMessage("From the command line, WORLD is required.");
|
||||
sender.sendMessage(this.description);
|
||||
@ -42,33 +42,33 @@ public class ModifyAddCommand extends BaseCommand {
|
||||
sender.sendMessage("Nothing changed.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
MVWorld world;
|
||||
String value = args[1];
|
||||
String property = args[2];
|
||||
|
||||
|
||||
if (args.length == 3) {
|
||||
world = this.plugin.getMVWorld(p.getWorld().getName());
|
||||
} else {
|
||||
world = this.plugin.getMVWorld(args[3]);
|
||||
}
|
||||
|
||||
|
||||
if (world == null) {
|
||||
sender.sendMessage("That world does not exist!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!ModifyCommand.validateAction(Action.Add, property)) {
|
||||
sender.sendMessage("Sorry, you can't ADD to " + property);
|
||||
sender.sendMessage("Please visit our wiki for more information: URLGOESHERE FERNFERRET DON'T FORGET IT!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (world.addToList(property, value)) {
|
||||
sender.sendMessage(value + " was added to " + property);
|
||||
} else {
|
||||
sender.sendMessage(value + " could not be added to " + property);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -9,11 +9,11 @@ import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import com.onarandombox.MultiverseCore.command.BaseCommand;
|
||||
|
||||
public class ModifyClearCommand extends BaseCommand {
|
||||
|
||||
|
||||
public ModifyClearCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.name = "Modify a World (Clear a property)";
|
||||
this.description = "Removes all values from a property. This will work on properties that contain lists";
|
||||
this.description = "Removes all values from a property. This will work on properties that contain lists.";
|
||||
this.usage = "/mvmodify" + ChatColor.GREEN + " CLEAR {PROPERTY}" + ChatColor.GOLD + " [WORLD] ";
|
||||
this.minArgs = 2;
|
||||
this.maxArgs = 3;
|
||||
@ -21,7 +21,7 @@ public class ModifyClearCommand extends BaseCommand {
|
||||
this.permission = "multiverse.world.modify";
|
||||
this.requiresOp = true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
// We NEED a world from the command line
|
||||
@ -36,21 +36,21 @@ public class ModifyClearCommand extends BaseCommand {
|
||||
sender.sendMessage("Nothing changed.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
MVWorld world;
|
||||
String property = args[1];
|
||||
|
||||
|
||||
if (args.length == 2) {
|
||||
world = this.plugin.getMVWorld(p.getWorld().getName());
|
||||
} else {
|
||||
world = this.plugin.getMVWorld(args[2]);
|
||||
}
|
||||
|
||||
|
||||
if (world == null) {
|
||||
sender.sendMessage("That world does not exist!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!ModifyCommand.validateAction(Action.Clear, property)) {
|
||||
sender.sendMessage("Sorry, you can't use CLEAR with " + property);
|
||||
sender.sendMessage("Please visit our wiki for more information: URLGOESHERE FERNFERRET DON'T FORGET IT!");
|
||||
@ -62,5 +62,5 @@ public class ModifyClearCommand extends BaseCommand {
|
||||
sender.sendMessage(property + " was NOT cleared.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,11 @@ import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import com.onarandombox.MultiverseCore.command.BaseCommand;
|
||||
|
||||
public class ModifyRemoveCommand extends BaseCommand {
|
||||
|
||||
|
||||
public ModifyRemoveCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.name = "Modify a World";
|
||||
this.description = "Modify various aspects of worlds. See the help wiki for how to use this command properly. If you do not include a world, the current world will be used";
|
||||
this.description = "Modify various aspects of worlds. See the help wiki for how to use this command properly. If you do not include a world, the current world will be used.";
|
||||
this.usage = "/mvmodify" + ChatColor.GREEN + "REMOVE {PROPERTY} {VALUE}" + ChatColor.GOLD + " [WORLD] ";
|
||||
this.minArgs = 3;
|
||||
this.maxArgs = 4;
|
||||
@ -22,7 +22,7 @@ public class ModifyRemoveCommand extends BaseCommand {
|
||||
this.permission = "multiverse.world.modify";
|
||||
this.requiresOp = true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
// We NEED a world from the command line
|
||||
@ -30,7 +30,7 @@ public class ModifyRemoveCommand extends BaseCommand {
|
||||
if (!(sender instanceof Player)) {
|
||||
p = (Player) sender;
|
||||
}
|
||||
|
||||
|
||||
if (args.length == 3 && p == null) {
|
||||
sender.sendMessage("From the command line, WORLD is required.");
|
||||
sender.sendMessage(this.description);
|
||||
@ -38,22 +38,22 @@ public class ModifyRemoveCommand extends BaseCommand {
|
||||
sender.sendMessage("Nothing changed.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
MVWorld world;
|
||||
String value = args[1];
|
||||
String property = args[2];
|
||||
|
||||
|
||||
if (args.length == 3) {
|
||||
world = this.plugin.getMVWorld(p.getWorld().getName());
|
||||
} else {
|
||||
world = this.plugin.getMVWorld(args[3]);
|
||||
}
|
||||
|
||||
|
||||
if (world == null) {
|
||||
sender.sendMessage("That world does not exist!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!ModifyCommand.validateAction(Action.Remove, property)) {
|
||||
sender.sendMessage("Sorry, you can't REMOVE anything from" + property);
|
||||
sender.sendMessage("Please visit our wiki for more information: URLGOESHERE FERNFERRET DON'T FORGET IT!");
|
||||
@ -65,5 +65,5 @@ public class ModifyRemoveCommand extends BaseCommand {
|
||||
sender.sendMessage(value + " could not be removed from " + property);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,11 @@ import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import com.onarandombox.MultiverseCore.command.BaseCommand;
|
||||
|
||||
public class ModifySetCommand extends BaseCommand {
|
||||
|
||||
|
||||
public ModifySetCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.name = "Modify a World (Set a value)";
|
||||
this.description = "Modify various aspects of worlds. See the help wiki for how to use this command properly. If you do not include a world, the current world will be used";
|
||||
this.description = "Modify various aspects of worlds. See the help wiki for how to use this command properly. If you do not include a world, the current world will be used.";
|
||||
this.usage = "/mvmodify" + ChatColor.GREEN + " SET {PROPERTY} {VALUE}" + ChatColor.GOLD + " [WORLD] ";
|
||||
this.minArgs = 3;
|
||||
this.maxArgs = 4;
|
||||
@ -21,7 +21,7 @@ public class ModifySetCommand extends BaseCommand {
|
||||
this.permission = "multiverse.world.modify";
|
||||
this.requiresOp = true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
// We NEED a world from the command line
|
||||
@ -29,7 +29,7 @@ public class ModifySetCommand extends BaseCommand {
|
||||
if (!(sender instanceof Player)) {
|
||||
p = (Player) sender;
|
||||
}
|
||||
|
||||
|
||||
if (args.length == 3 && p == null) {
|
||||
sender.sendMessage("From the command line, WORLD is required.");
|
||||
sender.sendMessage(this.description);
|
||||
@ -37,22 +37,22 @@ public class ModifySetCommand extends BaseCommand {
|
||||
sender.sendMessage("Nothing changed.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
MVWorld world;
|
||||
String value = args[1];
|
||||
String property = args[2];
|
||||
|
||||
|
||||
if (args.length == 3) {
|
||||
world = this.plugin.getMVWorld(p.getWorld().getName());
|
||||
} else {
|
||||
world = this.plugin.getMVWorld(args[3]);
|
||||
}
|
||||
|
||||
|
||||
if (world == null) {
|
||||
sender.sendMessage("That world does not exist!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!ModifyCommand.validateAction(Action.Set, property)) {
|
||||
sender.sendMessage("Sorry, you can't SET " + property);
|
||||
sender.sendMessage("Please visit our wiki for more information: URLGOESHERE FERNFERRET DON'T FORGET IT!");
|
||||
@ -64,5 +64,5 @@ public class ModifySetCommand extends BaseCommand {
|
||||
sender.sendMessage("There was an error setting " + property);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -8,11 +8,11 @@ import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import com.onarandombox.MultiverseCore.command.BaseCommand;
|
||||
|
||||
public class SpawnCommand extends BaseCommand {
|
||||
|
||||
|
||||
public SpawnCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.name = "Spawn";
|
||||
this.description = "Transports the player to the that player's current world Spawn Point.";
|
||||
this.description = "Teleports target player to the Spawn Point of the world they are in.";
|
||||
this.usage = "/mvspawn" + ChatColor.GOLD + " [PLAYER]";
|
||||
this.minArgs = 0;
|
||||
this.maxArgs = 1;
|
||||
@ -20,7 +20,7 @@ public class SpawnCommand extends BaseCommand {
|
||||
this.permission = "multiverse.world.spawn.self";
|
||||
this.requiresOp = false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
Player commandSender = null;
|
||||
|
@ -14,11 +14,11 @@ import com.onarandombox.MultiverseCore.MultiverseCore;
|
||||
import com.onarandombox.MultiverseCore.command.BaseCommand;
|
||||
|
||||
public class WhoCommand extends BaseCommand {
|
||||
|
||||
|
||||
public WhoCommand(MultiverseCore plugin) {
|
||||
super(plugin);
|
||||
this.name = "Who";
|
||||
this.description = "States who is in what world";
|
||||
this.description = "States who is in what world.";
|
||||
this.usage = "/mvwho" + ChatColor.GOLD + " [WORLD]";
|
||||
this.minArgs = 0;
|
||||
this.maxArgs = 1;
|
||||
@ -26,7 +26,7 @@ public class WhoCommand extends BaseCommand {
|
||||
this.permission = "multiverse.world.list.who";
|
||||
this.requiresOp = false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void execute(CommandSender sender, String[] args) {
|
||||
// If this command was sent from a Player then we need to check Permissions
|
||||
@ -34,9 +34,9 @@ public class WhoCommand extends BaseCommand {
|
||||
if (sender instanceof Player) {
|
||||
p = (Player) sender;
|
||||
}
|
||||
|
||||
|
||||
List<MVWorld> worlds = new ArrayList<MVWorld>();
|
||||
|
||||
|
||||
if (args.length > 0) {
|
||||
if (this.plugin.isMVWorld(args[0])) {
|
||||
worlds.add(this.plugin.getMVWorld(args[0]));
|
||||
@ -47,17 +47,17 @@ public class WhoCommand extends BaseCommand {
|
||||
} else {
|
||||
worlds = new ArrayList<MVWorld>(this.plugin.getMVWorlds());
|
||||
}
|
||||
|
||||
|
||||
for (MVWorld world : worlds) {
|
||||
if (!(this.plugin.isMVWorld(world.getName()))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
World w = this.plugin.getServer().getWorld(world.getName());
|
||||
if (p != null && (!this.plugin.ph.canEnterWorld(p, w))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
ChatColor color = ChatColor.GOLD;
|
||||
Environment env = world.getEnvironment();
|
||||
if (env == Environment.NETHER) {
|
||||
@ -68,7 +68,7 @@ public class WhoCommand extends BaseCommand {
|
||||
color = ChatColor.AQUA;
|
||||
}
|
||||
List<Player> players = w.getPlayers();
|
||||
|
||||
|
||||
String result = "";
|
||||
if (players.size() <= 0) {
|
||||
result = "Empty";
|
||||
@ -82,10 +82,10 @@ public class WhoCommand extends BaseCommand {
|
||||
worldName = world.getAlias();
|
||||
color = world.getAliasColor();
|
||||
}
|
||||
|
||||
|
||||
sender.sendMessage(color + worldName + ChatColor.WHITE + " - " + result);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user