mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 15:16:45 +01:00
Fixes #774 and allows for similar features in the future
This commit is contained in:
parent
ad1272b0e5
commit
c6f087fd50
@ -372,6 +372,19 @@ public class MainCommand extends CommandManager<PlotPlayer> {
|
|||||||
}
|
}
|
||||||
Command<PlotPlayer> cmd;
|
Command<PlotPlayer> cmd;
|
||||||
if (label != null) {
|
if (label != null) {
|
||||||
|
if (label.contains(":")) {
|
||||||
|
// Ref: c:v, this will push value to the last spot in the array
|
||||||
|
// ex. /p h:2 SomeUsername
|
||||||
|
// > /p h SomeUsername 2
|
||||||
|
String[] temp = label.split(":");
|
||||||
|
label = temp[0];
|
||||||
|
|
||||||
|
String[] tempArgs = new String[args.length + 1];
|
||||||
|
System.arraycopy(args, 0, tempArgs, 0, args.length);
|
||||||
|
tempArgs[tempArgs.length - 1] = temp[1];
|
||||||
|
|
||||||
|
args = tempArgs;
|
||||||
|
}
|
||||||
cmd = getInstance().commands.get(label.toLowerCase());
|
cmd = getInstance().commands.get(label.toLowerCase());
|
||||||
} else {
|
} else {
|
||||||
cmd = null;
|
cmd = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user