mirror of
https://github.com/aikar/commands.git
synced 2026-06-14 11:50:37 +00:00
Fix getFirstElement to not care if there is more than 1
This commit is contained in:
@@ -39,12 +39,12 @@ public class ACFSpongeUtil {
|
||||
}
|
||||
|
||||
if (matches.isEmpty()) {
|
||||
if (confirmList.isEmpty()) {
|
||||
issuer.sendError(MinecraftMessageKeys.NO_PLAYER_FOUND_SERVER,
|
||||
"{search}", name);
|
||||
Player player = ACFUtil.getFirstElement(confirmList);
|
||||
if (player == null) {
|
||||
issuer.sendError(MinecraftMessageKeys.NO_PLAYER_FOUND_SERVER, "{search}", name);
|
||||
return null;
|
||||
} else {
|
||||
Player player = ACFUtil.getFirstElement(confirmList);
|
||||
|
||||
issuer.sendInfo(MinecraftMessageKeys.PLAYER_IS_VANISHED_CONFIRM, "{vanished}", player.getName());
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user