Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=5.1.0
version=5.1.1
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ public VelocityExecutor(CommandManager<T, CommandSource> manager) {
@Override
public void execute(Invocation invocation) {
CommandSource source = invocation.source();
String[] args = invocation.arguments().split(" ");
String rawInput = invocation.arguments();
String[] args = rawInput.isEmpty() ? new String[0] : rawInput.split(" ");
String label = invocation.alias();
String labelLower = label.toLowerCase();
this.manager.getInvoker().invoke(source, labelLower, args);
Expand All @@ -53,7 +54,8 @@ public void execute(Invocation invocation) {
@Override
public List<String> suggest(Invocation invocation) {
CommandSource source = invocation.source();
String[] args = invocation.arguments().split(" ");
String rawInput = invocation.arguments();
String[] args = rawInput.isEmpty() ? new String[0] : rawInput.split(" ", -1);
String label = invocation.alias();
String labelLower = label.toLowerCase();
return this.manager.getInvoker().suggest(source, labelLower, args);
Expand Down
Loading