For 2.3-SNAPSHOT, text update method (#11)!

This commit is contained in:
Jitse Boonstra
2019-10-29 12:43:54 +01:00
parent d9558eef63
commit 5650cbd1e2
32 changed files with 287 additions and 471 deletions
@@ -303,12 +303,15 @@ public abstract class NPCBase implements NPC, NPCPacketHandler {
@Override
public NPC setText(List<String> text) {
List<Object> updatePackets = hologram.getUpdatePackets(text);
for (UUID shownUuid : shown) {
Player player = Bukkit.getPlayer(shownUuid);
if (player != null && isShown(player)) {
hologram.updateText(text);
hologram.update(player, updatePackets);
}
}
this.text = text;
return this;
}