本文整理了Java中org.bukkit.Server.matchPlayer()
方法的一些代码示例,展示了Server.matchPlayer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.matchPlayer()
方法的具体详情如下:
包路径:org.bukkit.Server
类名称:Server
方法名:matchPlayer
[英]Attempts to match any players with the given name, and returns a list of all possibly matches.
This list is not sorted in any particular order. If an exact match is found, the returned list will only contain a single result.
[中]尝试使用给定名称匹配任何玩家,并返回所有可能匹配的列表。
此列表未按任何特定顺序排序。如果找到了完全匹配的结果,返回的列表将只包含一个结果。
代码示例来源:origin: Bukkit/Bukkit
/**
* @see Server#matchPlayer(String name)
*/
@Deprecated
public static List<Player> matchPlayer(String name) {
return server.matchPlayer(name);
}
代码示例来源:origin: SpigotMC/Spigot-API
/**
* @see Server#matchPlayer(String name)
*/
public static List<Player> matchPlayer(String name) {
return server.matchPlayer(name);
}
代码示例来源:origin: ProSavage/SavageFactions
public Player strAsBestPlayerMatch(String name, Player def, boolean msg) {
Player ret = def;
if (name != null) {
List<Player> players = Bukkit.getServer().matchPlayer(name);
if (players.size() > 0) {
ret = players.get(0);
}
}
if (msg && ret == null) {
this.msg(TL.GENERIC_NOPLAYERMATCH, name);
}
return ret;
}
代码示例来源:origin: marcelo-mason/SimpleClans
/**
* Get a players full color name if he is online
*
* @param playerName
* @return
*/
public static String getColorName(String playerName) {
List<Player> players = SimpleClans.getInstance().getServer().matchPlayer(playerName);
if (players.size() == 1) {
return SimpleClans.getInstance().getPermissionsManager().getPrefix(players.get(0)) + players.get(0).getName() + SimpleClans.getInstance().getPermissionsManager().getSuffix(players.get(0));
}
return playerName;
}
代码示例来源:origin: aikar/commands
List<Player> matches = Bukkit.getServer().matchPlayer(name);
List<Player> confirmList = new ArrayList<>();
findMatches(search, requester, matches, confirmList);
代码示例来源:origin: AddstarMC/Minigames
String label, String[] args) {
if(args != null){
List<Player> plys = plugin.getServer().matchPlayer(args[0]);
MinigamePlayer ply = null;
if(!plys.isEmpty()){
plys = plugin.getServer().matchPlayer(args[1]);
MinigamePlayer ply2 = null;
代码示例来源:origin: AddstarMC/Minigames
List<Player> plmatch = Minigames.getPlugin().getServer().matchPlayer(args[0]);
if(!plmatch.isEmpty()){
MinigamePlayer pl = Minigames.getPlugin().getPlayerManager().getMinigamePlayer(plmatch.get(0));
代码示例来源:origin: AddstarMC/Minigames
List<Player> plys = plugin.getServer().matchPlayer(args[1]);
if(!plys.isEmpty()){
ply = plugin.getPlayerManager().getMinigamePlayer(plys.get(0));
代码示例来源:origin: AddstarMC/Minigames
List<Player> players = plugin.getServer().matchPlayer(args[0]);
MinigamePlayer ply = null;
if(args[0].equals("ALL")){
内容来源于网络,如有侵权,请联系作者删除!