Punctuation and spelling fix.

This commit is contained in:
JitseB
2018-04-25 15:32:00 +02:00
parent 41821c8783
commit c51f522874
2 changed files with 3 additions and 2 deletions
@@ -63,7 +63,7 @@ public class ChunkListener implements Listener {
Player player = Bukkit.getPlayer(uuid); Player player = Bukkit.getPlayer(uuid);
if (npcChunk.getWorld() != player.getWorld()) { if (npcChunk.getWorld() != player.getWorld()) {
continue; // Player and NPC are not in the same world continue; // Player and NPC are not in the same world.
} }
double hideDistance = npc.getAutoHideDistance(); double hideDistance = npc.getAutoHideDistance();
@@ -30,6 +30,7 @@ public class PlayerListener implements Listener {
npc.getAutoHidden().remove(player.getUniqueId()); npc.getAutoHidden().remove(player.getUniqueId());
} }
// Don't need to use NPC#hide since the entity is not registered in the NMS server.
if (npc.getShown().contains(player.getUniqueId())) { if (npc.getShown().contains(player.getUniqueId())) {
npc.getShown().remove(player.getUniqueId()); npc.getShown().remove(player.getUniqueId());
} }
@@ -41,7 +42,7 @@ public class PlayerListener implements Listener {
Player player = event.getPlayer(); Player player = event.getPlayer();
World from = event.getFrom(); World from = event.getFrom();
// The PlayerTeleportEvent is call, and will handle visiiblity in the new world // The PlayerTeleportEvent is call, and will handle visibility in the new world.
for (NPC npc : NPCManager.getAllNPCs()) { for (NPC npc : NPCManager.getAllNPCs()) {
if (npc.getLocation().getWorld() == from) { if (npc.getLocation().getWorld() == from) {
if (!npc.getAutoHidden().contains(player.getUniqueId())) { if (!npc.getAutoHidden().contains(player.getUniqueId())) {