mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 14:46:45 +01:00
Merge branch 'master' of https://github.com/dmodoomsirius/PlotSquared
This commit is contained in:
commit
5ec6bc62ca
@ -35,6 +35,7 @@ import com.plotsquared.general.commands.CommandDeclaration;
|
|||||||
aliases = {"k"},
|
aliases = {"k"},
|
||||||
description = "Kick a player from your plot",
|
description = "Kick a player from your plot",
|
||||||
permission = "plots.kick",
|
permission = "plots.kick",
|
||||||
|
usage = "<player>",
|
||||||
category = CommandCategory.TELEPORT,
|
category = CommandCategory.TELEPORT,
|
||||||
requiredType = RequiredType.PLAYER)
|
requiredType = RequiredType.PLAYER)
|
||||||
public class Kick extends SubCommand {
|
public class Kick extends SubCommand {
|
||||||
|
@ -336,6 +336,11 @@ public abstract class Command {
|
|||||||
String[] baseSplit = getCommandString().split(" ");
|
String[] baseSplit = getCommandString().split(" ");
|
||||||
String[] fullSplit = getUsage().split(" ");
|
String[] fullSplit = getUsage().split(" ");
|
||||||
String base = getCommandString();
|
String base = getCommandString();
|
||||||
|
if (fullSplit.length - baseSplit.length < reqArgs.length) {
|
||||||
|
String[] tmp = new String[baseSplit.length + reqArgs.length];
|
||||||
|
System.arraycopy(fullSplit, 0, tmp, 0, fullSplit.length);
|
||||||
|
fullSplit = tmp;
|
||||||
|
}
|
||||||
for (int i = 0; i < reqArgs.length; i++) {
|
for (int i = 0; i < reqArgs.length; i++) {
|
||||||
fullSplit[i + baseSplit.length] = reqArgs[i].getExample().toString();
|
fullSplit[i + baseSplit.length] = reqArgs[i].getExample().toString();
|
||||||
failed = failed || reqArgs[i].parse(args[i]) == null;
|
failed = failed || reqArgs[i].parse(args[i]) == null;
|
||||||
|
Loading…
Reference in New Issue
Block a user