Fix CommandPart for optional parameter at end of command
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Ursprung
74866de040
Commit
235bdce294
@ -84,10 +84,6 @@ public class CommandPart {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void generateArgumentArray(List<Object> current, CommandSender commandSender, String[] args, int startIndex) {
|
public void generateArgumentArray(List<Object> current, CommandSender commandSender, String[] args, int startIndex) {
|
||||||
if (startIndex >= args.length && varArgType == null) {
|
|
||||||
throw new CommandParseException();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (varArgType != null) {
|
if (varArgType != null) {
|
||||||
Object array = Array.newInstance(varArgType, args.length - startIndex);
|
Object array = Array.newInstance(varArgType, args.length - startIndex);
|
||||||
for (int i = startIndex; i < args.length; i++) {
|
for (int i = startIndex; i < args.length; i++) {
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren