Updates for v1.3.

This commit is contained in:
Jitse Boonstra
2018-11-25 14:10:56 +01:00
parent e0f7ed2ab7
commit a6e8c0f4ce
19 changed files with 67 additions and 58 deletions
+2 -2
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>net.jitse</groupId>
<artifactId>npclib</artifactId>
<version>1.2.2</version>
<version>1.3</version>
</parent>
<artifactId>npclib-commons</artifactId>
@@ -16,7 +16,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.13-R0.1-SNAPSHOT</version>
<version>1.13.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
@@ -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;