Link scoreboard

This commit is contained in:
fullwall 2014-06-29 20:39:48 -07:00
parent d5162464bd
commit b44788510f

View File

@ -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();
}