Updates for v1.3.
This commit is contained in:
@@ -77,7 +77,7 @@ public class PlayerListener implements Listener {
|
||||
// This will cause issues otherwise (e.g. custom skin disappearing).
|
||||
double hideDistance = npc.getAutoHideDistance();
|
||||
double distanceSquared = player.getLocation().distanceSquared(npc.getLocation());
|
||||
boolean inRange = distanceSquared <= (hideDistance * hideDistance) || distanceSquared <= (Bukkit.getViewDistance() << 4);
|
||||
boolean inRange = distanceSquared <= (hideDistance * hideDistance) && distanceSquared <= (Bukkit.getViewDistance() << 4);
|
||||
if (npc.getAutoHidden().contains(player.getUniqueId())) {
|
||||
// Check if the player and NPC are within the range to sendShowPackets it again.
|
||||
if (inRange) {
|
||||
|
||||
@@ -5,13 +5,8 @@
|
||||
package net.jitse.npclib.nms.holograms;
|
||||
|
||||
import com.comphenix.tinyprotocol.Reflection;
|
||||
import net.minecraft.server.v1_13_R1.EntityArmorStand;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Nameable;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.craftbukkit.v1_13_R1.entity.CraftArmorStand;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
Reference in New Issue
Block a user