Add some scoreboard team debug

This commit is contained in:
fullwall 2023-09-13 23:00:02 +08:00
parent bec532952a
commit 2931f95939

View File

@ -22,6 +22,7 @@ import net.citizensnpcs.api.npc.NPC;
import net.citizensnpcs.api.persistence.Persist;
import net.citizensnpcs.api.trait.Trait;
import net.citizensnpcs.api.trait.TraitName;
import net.citizensnpcs.api.util.Messaging;
import net.citizensnpcs.util.NMS;
import net.citizensnpcs.util.Util;
@ -72,6 +73,7 @@ public class ScoreboardTrait extends Trait {
clearClientTeams(team);
}
team.addEntry(entityName);
Messaging.debug("Created team", teamName, "with entity", entityName);
}
public ChatColor getColor() {
@ -107,8 +109,10 @@ public class ScoreboardTrait extends Trait {
if (team.getSize() == 1) {
clearClientTeams(team);
team.unregister();
Messaging.debug("Removed team", teamName);
} else {
team.removeEntry(name);
Messaging.debug("Removed team entry", name, "from", teamName);
}
}, reason == DespawnReason.DEATH && npc.getEntity() instanceof LivingEntity ? 20 : 2);
}
@ -129,7 +133,6 @@ public class ScoreboardTrait extends Trait {
SUPPORT_TAGS = false;
}
}
}
public void setColor(ChatColor color) {