fix suggest
This commit is contained in:
parent
eef54eba80
commit
bad2c2d0c1
3 changed files with 3 additions and 3 deletions
|
@ -43,7 +43,7 @@ public class CommandFind implements SimpleCommand {
|
||||||
String[] currentArgs = invocation.arguments();
|
String[] currentArgs = invocation.arguments();
|
||||||
|
|
||||||
List<String> arg = new ArrayList<>();
|
List<String> arg = new ArrayList<>();
|
||||||
if (currentArgs.length == 1 && invocation.source().hasPermission("vtools.find.autocomplete")) {
|
if (currentArgs.length <= 1 && invocation.source().hasPermission("vtools.find.autocomplete")) {
|
||||||
for (Player player : server.getAllPlayers()) {
|
for (Player player : server.getAllPlayers()) {
|
||||||
arg.add(player.getUsername());
|
arg.add(player.getUsername());
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class CommandSend implements SimpleCommand {
|
||||||
String[] currentArgs = invocation.arguments();
|
String[] currentArgs = invocation.arguments();
|
||||||
|
|
||||||
List<String> arg = new ArrayList<String>();
|
List<String> arg = new ArrayList<String>();
|
||||||
if (currentArgs.length == 1) {
|
if (currentArgs.length <= 1) {
|
||||||
arg.add("all");
|
arg.add("all");
|
||||||
arg.add("current");
|
arg.add("current");
|
||||||
for (Player player : server.getAllPlayers()) {
|
for (Player player : server.getAllPlayers()) {
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class CommandTp implements SimpleCommand {
|
||||||
@Override
|
@Override
|
||||||
public List<String> suggest(Invocation commandInvocation) {
|
public List<String> suggest(Invocation commandInvocation) {
|
||||||
List<String> arg = new ArrayList<>();
|
List<String> arg = new ArrayList<>();
|
||||||
if (commandInvocation.arguments().length == 1) {
|
if (commandInvocation.arguments().length <= 1) {
|
||||||
for (Player player : server.getAllPlayers()) {
|
for (Player player : server.getAllPlayers()) {
|
||||||
arg.add(player.getUsername());
|
arg.add(player.getUsername());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue