本文整理汇总了Java中org.bukkit.scoreboard.Team.getPrefix方法的典型用法代码示例。如果您正苦于以下问题:Java Team.getPrefix方法的具体用法?Java Team.getPrefix怎么用?Java Team.getPrefix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bukkit.scoreboard.Team
的用法示例。
在下文中一共展示了Team.getPrefix方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updatePrefix
import org.bukkit.scoreboard.Team; //导入方法依赖的package包/类
private void updatePrefix(FScoreboard fboard) {
if (plugin.getFConfig().getDefaultScoreboardPrefixes()) {
FPlayer fplayer = fboard.getFPlayer();
Team team = teams.get(fboard);
String prefix = plugin.getFConfig().getNametagPrefix();
prefix = ParsingUtil.replaceRelationPlaceholders(prefix, faction, fplayer);
prefix = ParsingUtil.replaceFactionPlaceholders(prefix, faction);
// Avoid client bug
if (prefix.length() > 16) {
prefix = prefix.substring(0, 15);
}
if (team.getPrefix() == null || !team.getPrefix().equals(prefix)) {
team.setPrefix(prefix);
}
}
}
示例2: checkForTeamChanges
import org.bukkit.scoreboard.Team; //导入方法依赖的package包/类
private static void checkForTeamChanges() {
for (Player player : Bukkit.getOnlinePlayers()) {
Team team = player.getScoreboard() != null ? player.getScoreboard().getEntryTeam(player.getName()) : null;
String fullTablistName = team == null ? getTablistName(player) : team.getPrefix() + getTablistName(player) + team.getSuffix();
if (!player.getPlayerListName().equals(fullTablistName)) {
updateTablistName(player);
}
}
}
示例3: getTeamValue
import org.bukkit.scoreboard.Team; //导入方法依赖的package包/类
public static String getTeamValue(Team team) {
String update = team.getName();
if (team.getPrefix() != null) {
update = team.getPrefix() + update;
}
if (team.getSuffix() != null) {
update = update + team.getSuffix();
}
return update;
}
示例4: getNametagPrefix
import org.bukkit.scoreboard.Team; //导入方法依赖的package包/类
public static String getNametagPrefix(String nametag) {
Team team = Bukkit.getScoreboardManager().getMainScoreboard().getTeam(nametag);
if (team != null) {
return team.getPrefix();
} else {
Bukkit.getConsoleSender().sendMessage(Skellett.cc(Skellett.prefix + "&cNo nametag under the name " + nametag + " &cwas found!"));
return null;
}
}