mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 11:55:38 +01:00
Updating command usage formats
This commit is contained in:
parent
08cd39749b
commit
e1db27010c
@ -21,7 +21,7 @@ import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler;
|
||||
@Override public boolean onCommand(PlotPlayer player, String[] args) {
|
||||
|
||||
if (args.length == 0) {
|
||||
Captions.COMMAND_SYNTAX.send(player, "/plot alias <set|remove> <value>");
|
||||
Captions.COMMAND_SYNTAX.send(player, getUsage());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -64,7 +64,7 @@ import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
Captions.COMMAND_SYNTAX.send(player, "/plot alias <set|remove> <alias>");
|
||||
Captions.COMMAND_SYNTAX.send(player, getUsage());
|
||||
result = false;
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@ import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
@CommandDeclaration(command = "condense", permission = "plots.admin",
|
||||
usage = "/plot condense <area> <start|stop|info> [radius]",
|
||||
description = "Condense a plotworld", category = CommandCategory.ADMINISTRATION,
|
||||
requiredType = RequiredType.CONSOLE) public class Condense extends SubCommand {
|
||||
|
||||
@ -27,7 +28,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
@Override public boolean onCommand(final PlotPlayer player, String[] args) {
|
||||
if (args.length != 2 && args.length != 3) {
|
||||
MainUtil.sendMessage(player, "/plot condense <area> <start|stop|info> [radius]");
|
||||
MainUtil.sendMessage(player, getUsage());
|
||||
return false;
|
||||
}
|
||||
PlotArea area = PlotSquared.get().getPlotAreaByString(args[0]);
|
||||
|
@ -12,7 +12,7 @@ import com.github.intellectualsites.plotsquared.plot.util.Permissions;
|
||||
@CommandDeclaration(command = "continue",
|
||||
description = "Continue a plot that was previously marked as done",
|
||||
permission = "plots.continue", category = CommandCategory.SETTINGS,
|
||||
requiredType = RequiredType.NONE) public class Continue extends SubCommand {
|
||||
requiredType = RequiredType.PLAYER) public class Continue extends SubCommand {
|
||||
|
||||
@Override public boolean onCommand(PlotPlayer player, String[] args) {
|
||||
Plot plot = player.getCurrentPlot();
|
||||
|
@ -48,7 +48,7 @@ import java.util.Map.Entry;
|
||||
|
||||
@Override public boolean onCommand(final PlotPlayer player, String[] args) {
|
||||
if (args.length < 1) {
|
||||
MainUtil.sendMessage(player, "/plot database [area] <sqlite|mysql|import>");
|
||||
MainUtil.sendMessage(player, getUsage());
|
||||
return false;
|
||||
}
|
||||
List<Plot> plots;
|
||||
@ -60,7 +60,7 @@ import java.util.Map.Entry;
|
||||
plots = PlotSquared.get().sortPlotsByTemp(PlotSquared.get().getPlots());
|
||||
}
|
||||
if (args.length < 1) {
|
||||
MainUtil.sendMessage(player, "/plot database [world] <sqlite|mysql|import>");
|
||||
MainUtil.sendMessage(player, getUsage());
|
||||
MainUtil.sendMessage(player, "[arg] indicates an optional argument");
|
||||
return false;
|
||||
}
|
||||
|
@ -87,8 +87,7 @@ import java.util.*;
|
||||
* plot flag list
|
||||
*/
|
||||
if (args.length == 0) {
|
||||
MainUtil.sendMessage(player, Captions.COMMAND_SYNTAX,
|
||||
"/plot flag <set|remove|add|list|info>");
|
||||
MainUtil.sendMessage(player, Captions.COMMAND_SYNTAX, getUsage());
|
||||
return false;
|
||||
}
|
||||
Location loc = player.getLocation();
|
||||
@ -311,7 +310,7 @@ import java.util.*;
|
||||
return true;
|
||||
}
|
||||
MainUtil
|
||||
.sendMessage(player, Captions.COMMAND_SYNTAX, "/plot flag <set|remove|add|list|info>");
|
||||
.sendMessage(player, Captions.COMMAND_SYNTAX, getUsage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -71,8 +71,7 @@ import java.util.List;
|
||||
return false;
|
||||
}
|
||||
if (args.length == 0) {
|
||||
sendMessage(player, Captions.COMMAND_SYNTAX,
|
||||
"/plot inbox [inbox] [delete <index>|clear|page]");
|
||||
sendMessage(player, Captions.COMMAND_SYNTAX, getUsage());
|
||||
for (final CommentInbox inbox : CommentManager.inboxes.values()) {
|
||||
if (inbox.canRead(plot, player)) {
|
||||
if (!inbox.getComments(plot, new RunnableVal<List<PlotComment>>() {
|
||||
@ -172,8 +171,7 @@ import java.util.List;
|
||||
try {
|
||||
page = Integer.parseInt(args[1]);
|
||||
} catch (NumberFormatException ignored) {
|
||||
sendMessage(player, Captions.COMMAND_SYNTAX,
|
||||
"/plot inbox [inbox] [delete <index>|clear|page]");
|
||||
sendMessage(player, Captions.COMMAND_SYNTAX, getUsage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ import java.util.UUID;
|
||||
@CommandDeclaration(command = "setowner", permission = "plots.set.owner",
|
||||
description = "Set the plot owner", usage = "/plot setowner <player>",
|
||||
aliases = {"owner", "so", "seto"}, category = CommandCategory.CLAIMING,
|
||||
requiredType = RequiredType.NONE, confirmation = true) public class Owner extends SetCommand {
|
||||
requiredType = RequiredType.PLAYER, confirmation = true) public class Owner extends SetCommand {
|
||||
|
||||
@Override public boolean set(final PlotPlayer player, final Plot plot, String value) {
|
||||
Set<Plot> plots = plot.getConnectedPlots();
|
||||
|
@ -25,7 +25,7 @@ import java.util.UUID;
|
||||
|
||||
@CommandDeclaration(command = "schematic", permission = "plots.schematic",
|
||||
description = "Schematic command", aliases = {"sch", "schem"},
|
||||
category = CommandCategory.SCHEMATIC, usage = "/plot schematic <arg...>")
|
||||
category = CommandCategory.SCHEMATIC, usage = "/plot schematic <test|save|saveall|paste>")
|
||||
public class SchematicCmd extends SubCommand {
|
||||
|
||||
private boolean running = false;
|
||||
|
@ -113,8 +113,7 @@ import java.util.zip.ZipOutputStream;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
MainUtil.sendMessage(player, Captions.COMMAND_SYNTAX,
|
||||
"/plot template <import|export> <world> [template]");
|
||||
MainUtil.sendMessage(player, Captions.COMMAND_SYNTAX, getUsage());
|
||||
return true;
|
||||
}
|
||||
final String world = args[1];
|
||||
|
@ -9,14 +9,16 @@ import com.github.intellectualsites.plotsquared.plot.object.RunnableVal3;
|
||||
import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
|
||||
|
||||
@CommandDeclaration(command = "toggle", aliases = {"attribute"}, permission = "plots.use",
|
||||
usage = "/plot toggle <chat|chatspy|clear-confirmation|titles|worldedit>",
|
||||
description = "Toggle per user settings", requiredType = RequiredType.NONE,
|
||||
category = CommandCategory.SETTINGS) public class Toggle extends Command {
|
||||
|
||||
public Toggle() {
|
||||
super(MainCommand.getInstance(), true);
|
||||
}
|
||||
|
||||
@CommandDeclaration(command = "chatspy", aliases = {"spy"},
|
||||
permission = "plots.admin.command.chat", description = "Toggle admin chat spying")
|
||||
permission = "plots.admin.command.chat", description = "Toggle plot chat spy")
|
||||
public void chatspy(Command command, PlotPlayer player, String[] args,
|
||||
RunnableVal3<Command, Runnable, Runnable> confirm,
|
||||
RunnableVal2<Command, CommandResult> whenDone) {
|
||||
|
Loading…
Reference in New Issue
Block a user