mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-19 13:54:43 +02:00
@ -9,6 +9,7 @@ import org.bukkit.command.TabExecutor;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.StringUtil;
|
||||
|
||||
import com.gmail.nossr50.datatypes.party.Party;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.commands.chat.PartyChatCommand;
|
||||
import com.gmail.nossr50.commands.party.alliance.PartyAllianceCommand;
|
||||
@ -175,7 +176,7 @@ public class PartyCommand implements TabExecutor {
|
||||
case INVITE:
|
||||
case KICK:
|
||||
case OWNER:
|
||||
Set<String> playerNames = UserManager.getPlayerNames();
|
||||
List<String> playerNames = CommandUtils.getOnlinePlayerNames(sender);
|
||||
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
case XPSHARE:
|
||||
return StringUtil.copyPartialMatches(args[1], XPSHARE_COMPLETIONS, new ArrayList<String>(XPSHARE_COMPLETIONS.size()));
|
||||
@ -190,7 +191,10 @@ public class PartyCommand implements TabExecutor {
|
||||
List<String> matches = StringUtil.copyPartialMatches(args[1], PtpCommand.TELEPORT_SUBCOMMANDS, new ArrayList<String>(PtpCommand.TELEPORT_SUBCOMMANDS.size()));
|
||||
|
||||
if (matches.size() == 0) {
|
||||
playerNames = UserManager.getPlayerNames();
|
||||
Player player = (Player) sender;
|
||||
Party party = UserManager.getPlayer(player).getParty();
|
||||
|
||||
playerNames = party.getOnlinePlayerNames(player);
|
||||
return StringUtil.copyPartialMatches(args[1], playerNames, new ArrayList<String>(playerNames.size()));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user