Update requriedTypes

This commit is contained in:
NotMyFault 2020-01-10 14:01:28 +01:00
parent 808a1ed703
commit 6ee9d91aef
7 changed files with 10 additions and 10 deletions

View file

@ -19,7 +19,7 @@ import java.util.UUID;
import java.util.concurrent.CompletableFuture;
@CommandDeclaration(command = "add",
description = "Allow a user to build in a plot while you are online",
description = "Allow a user to build in a plot while the plot owner is online.",
usage = "/plot add <player|*>", category = CommandCategory.SETTINGS, permission = "plots.add",
requiredType = RequiredType.PLAYER) public class Add extends Command {
@ -35,7 +35,7 @@ import java.util.concurrent.CompletableFuture;
checkTrue(plot.isOwner(player.getUUID()) || Permissions
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_TRUST),
Captions.NO_PLOT_PERMS);
checkTrue(args.length == 1, Captions.COMMAND_SYNTAX, getUsage());
checkTrue(args.length == 1, Captions.COMMAND_SYNTAX, "/plot add <player|*>");
final Set<UUID> uuids = MainUtil.getUUIDsFromString(args[0]);
checkTrue(!uuids.isEmpty(), Captions.INVALID_PLAYER, args[0]);
Iterator<UUID> iterator = uuids.iterator();

View file

@ -46,7 +46,7 @@ import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler;
switch (args[0].toLowerCase()) {
case "set":
if (args.length != 2) {
Captions.COMMAND_SYNTAX.send(player, "/plot alias <set> <value>");
Captions.COMMAND_SYNTAX.send(player, getUsage());
return false;
}
@ -74,7 +74,7 @@ import com.github.intellectualsites.plotsquared.plot.util.UUIDHandler;
private boolean setAlias(PlotPlayer player, Plot plot, String alias) {
if (alias.isEmpty()) {
Captions.COMMAND_SYNTAX.send(player, "/plot alias <set> <value>");
Captions.COMMAND_SYNTAX.send(player, getUsage());
return false;
}
if (alias.length() >= 50) {

View file

@ -18,7 +18,7 @@ import com.google.common.primitives.Ints;
@CommandDeclaration(command = "claim", aliases = "c",
description = "Claim the current plot you're standing on", category = CommandCategory.CLAIMING,
requiredType = RequiredType.NONE, permission = "plots.claim", usage = "/plot claim")
requiredType = RequiredType.PLAYER, permission = "plots.claim", usage = "/plot claim")
public class Claim extends SubCommand {
@Override public boolean onCommand(final PlotPlayer player, String[] args) {

View file

@ -16,7 +16,7 @@ import com.github.intellectualsites.plotsquared.plot.util.block.GlobalBlockQueue
import java.util.concurrent.CompletableFuture;
@CommandDeclaration(command = "clear", description = "Clear the plot you stand on",
@CommandDeclaration(command = "clear", description = "Clear the plot you stand on", requiredType = RequiredType.NONE,
permission = "plots.clear", category = CommandCategory.APPEARANCE, usage = "/plot clear",
aliases = "reset", confirmation = true) public class Clear extends Command {

View file

@ -10,7 +10,7 @@ import com.github.intellectualsites.plotsquared.plot.object.PlotPlayer;
import com.github.intellectualsites.plotsquared.plot.util.MainUtil;
@CommandDeclaration(command = "createroadschematic", aliases = {"crs"},
category = CommandCategory.ADMINISTRATION, requiredType = RequiredType.NONE,
category = CommandCategory.ADMINISTRATION, requiredType = RequiredType.PLAYER,
permission = "plots.createroadschematic",
description = "Add a road schematic to your world using the roads around your current plot",
usage = "/plot createroadschematic") public class CreateRoadSchematic extends SubCommand {

View file

@ -19,7 +19,7 @@ import java.util.Set;
import java.util.UUID;
@CommandDeclaration(command = "deny", aliases = {"d", "ban"},
description = "Deny a user from a plot", usage = "/plot deny <player|*>",
description = "Deny a user from entering a plot", usage = "/plot deny <player|*>",
category = CommandCategory.SETTINGS, requiredType = RequiredType.PLAYER) public class Deny
extends SubCommand {

View file

@ -19,7 +19,7 @@ import java.util.concurrent.CompletableFuture;
@CommandDeclaration(command = "trust", aliases = {"t"}, requiredType = RequiredType.PLAYER,
usage = "/plot trust <player|*>",
description = "Allow a user to build in a plot and use WorldEdit while you are offline",
description = "Allow a user to build in a plot and use WorldEdit while the plot owner is offline.",
category = CommandCategory.SETTINGS) public class Trust extends Command {
public Trust() {
@ -37,7 +37,7 @@ import java.util.concurrent.CompletableFuture;
checkTrue(currentPlot.isOwner(player.getUUID()) || Permissions
.hasPermission(player, Captions.PERMISSION_ADMIN_COMMAND_TRUST),
Captions.NO_PLOT_PERMS);
checkTrue(args.length == 1, Captions.COMMAND_SYNTAX, getUsage());
checkTrue(args.length == 1, Captions.COMMAND_SYNTAX, "/plot trust <player|*>");
final Set<UUID> uuids = MainUtil.getUUIDsFromString(args[0]);
checkTrue(!uuids.isEmpty(), Captions.INVALID_PLAYER, args[0]);
Iterator<UUID> iterator = uuids.iterator();