Fix errors on world change

This commit is contained in:
MrMicky 2018-04-25 14:38:50 +02:00
parent 1fba0d9ff0
commit 2d3f6e46a3
2 changed files with 3 additions and 3 deletions

View File

@ -150,7 +150,7 @@ public abstract class NPC {
shown.remove(player.getUniqueId());
if (player.getLocation().distance(location) <= autoHideDistance) {
if (player.getWorld() == location.getWorld() && player.getLocation().distance(location) <= autoHideDistance) {
sendHidePackets(player);
} else {
if (autoHidden.contains(player.getUniqueId())) {

View File

@ -30,8 +30,8 @@ public class PlayerListener implements Listener {
npc.getAutoHidden().remove(player.getUniqueId());
}
if (npc.isActuallyShown(player)) {
npc.hide(player);
if (npc.getShown().contains(player.getUniqueId())) {
npc.getShown().remove(player.getUniqueId());
}
}
}