fix: 修复 eco 管理员指令无法补全玩家名称的问题

This commit is contained in:
2024-05-08 02:15:32 +08:00
parent 13b8a3ee73
commit 0743728cbf
2 changed files with 4 additions and 3 deletions

View File

@@ -5,7 +5,7 @@ plugins {
} }
group 'cn.hamster3' group 'cn.hamster3'
version '2.2.3' version '2.2.4'
repositories { repositories {
maven { maven {

View File

@@ -10,6 +10,7 @@ import cn.hamster3.currency.data.PlayerData;
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import java.util.Collections;
import java.util.List; import java.util.List;
public abstract class VaultAdminSetCommand extends CommandExecutor { public abstract class VaultAdminSetCommand extends CommandExecutor {
@@ -79,8 +80,8 @@ public abstract class VaultAdminSetCommand extends CommandExecutor {
@SuppressWarnings("DuplicatedCode") @SuppressWarnings("DuplicatedCode")
public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) { public List<String> onTabComplete(CommandSender sender, Command command, String alias, String[] args) {
if (args.length == 2) { if (args.length == 2) {
return HamsterAPI.getOnlinePlayersName(args[0]); return HamsterAPI.getOnlinePlayersName(args[1]);
} }
return null; return Collections.emptyList();
} }
} }