1
0
Fork 0
forked from mc/VTools

fix suggest

This commit is contained in:
JerryXiao 2023-03-20 18:32:31 +08:00
parent eef54eba80
commit bad2c2d0c1
Signed by untrusted user: Jerry
GPG key ID: 22618F758B5BE2E5
3 changed files with 3 additions and 3 deletions

View file

@ -43,7 +43,7 @@ public class CommandFind implements SimpleCommand {
String[] currentArgs = invocation.arguments();
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()) {
arg.add(player.getUsername());
}

View file

@ -83,7 +83,7 @@ public class CommandSend implements SimpleCommand {
String[] currentArgs = invocation.arguments();
List<String> arg = new ArrayList<String>();
if (currentArgs.length == 1) {
if (currentArgs.length <= 1) {
arg.add("all");
arg.add("current");
for (Player player : server.getAllPlayers()) {

View file

@ -46,7 +46,7 @@ public class CommandTp implements SimpleCommand {
@Override
public List<String> suggest(Invocation commandInvocation) {
List<String> arg = new ArrayList<>();
if (commandInvocation.arguments().length == 1) {
if (commandInvocation.arguments().length <= 1) {
for (Player player : server.getAllPlayers()) {
arg.add(player.getUsername());
}