This commit is contained in:
sky 2020-02-28 21:31:59 +08:00
parent 55c5c5a532
commit 97f710809c

View File

@ -95,10 +95,15 @@ public class TagDataHandler implements Listener {
private void updateTeamVariable(Scoreboard scoreboard, TagPlayerData playerData) { private void updateTeamVariable(Scoreboard scoreboard, TagPlayerData playerData) {
Team entryTeam = TagUtils.getTeamComputeIfAbsent(scoreboard, playerData.getTeamHash()); Team entryTeam = TagUtils.getTeamComputeIfAbsent(scoreboard, playerData.getTeamHash());
if (!entryTeam.getEntries().contains(playerData.getNameDisplay())) {
entryTeam.addEntry(playerData.getNameDisplay()); entryTeam.addEntry(playerData.getNameDisplay());
}
if (entryTeam.getPrefix() == null || !entryTeam.getPrefix().equals(playerData.getPrefix())) {
entryTeam.setPrefix(playerData.getPrefix()); entryTeam.setPrefix(playerData.getPrefix());
}
if (entryTeam.getSuffix() == null || !entryTeam.getSuffix().equals(playerData.getSuffix())) {
entryTeam.setSuffix(playerData.getSuffix()); entryTeam.setSuffix(playerData.getSuffix());
// 傻逼 BedWarsRel 我草你妈的 }
if (TabooLib.getConfig().getBoolean("TABLIST-AUTO-CLEAN-TEAM", true)) { if (TabooLib.getConfig().getBoolean("TABLIST-AUTO-CLEAN-TEAM", true)) {
TagUtils.cleanEmptyTeamInScoreboard(scoreboard); TagUtils.cleanEmptyTeamInScoreboard(scoreboard);
} }