mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-27 18:41:23 +01:00
Link scoreboard
This commit is contained in:
parent
d5162464bd
commit
b44788510f
@ -80,6 +80,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.Skeleton.SkeletonType;
|
||||
import org.bukkit.entity.Villager.Profession;
|
||||
import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
import org.bukkit.metadata.MetadataValue;
|
||||
import org.bukkit.scoreboard.DisplaySlot;
|
||||
import org.bukkit.scoreboard.Objective;
|
||||
@ -1141,6 +1142,7 @@ public class NPCCommands {
|
||||
Scoreboard main;
|
||||
if (!itr.iterator().hasNext()) {
|
||||
main = Bukkit.getScoreboardManager().getNewScoreboard();
|
||||
npc.getEntity().setMetadata("citizens.scoreboard", new FixedMetadataValue(CitizensAPI.getPlugin(), main));
|
||||
} else {
|
||||
main = (Scoreboard) itr.iterator().next().value();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user