diff --git a/api/src/main/java/lol/pyr/znpcsplus/api/npc/Npc.java b/api/src/main/java/lol/pyr/znpcsplus/api/npc/Npc.java index 740a2f3..1c25a8d 100644 --- a/api/src/main/java/lol/pyr/znpcsplus/api/npc/Npc.java +++ b/api/src/main/java/lol/pyr/znpcsplus/api/npc/Npc.java @@ -100,28 +100,6 @@ public interface Npc extends PropertyHolder { */ void respawn(Player player); - /** - * Blacklists a player from sending packets for this NPC - * This means that the run task won't send packets to the player - * - * @param player The player to be blacklisted - */ - void blacklist(Player player); - - /** - * Removes a player from the blacklist, allowing packets to be sent to them for this NPC. - * - * @param player The player to be removed from the blacklist - */ - void unblacklist(Player player); - - /** - * Gets if a player is blacklisted from sending packets for this NPC - * @param player The player to check - * @return If the player is blacklisted - */ - boolean isBlacklisted(Player player); - /** * Sets the head rotation of this NPC for a player * @param player The {@link Player} to set the head rotation for diff --git a/plugin/src/main/java/lol/pyr/znpcsplus/tasks/NpcProcessorTask.java b/plugin/src/main/java/lol/pyr/znpcsplus/tasks/NpcProcessorTask.java index a077274..f92838d 100644 --- a/plugin/src/main/java/lol/pyr/znpcsplus/tasks/NpcProcessorTask.java +++ b/plugin/src/main/java/lol/pyr/znpcsplus/tasks/NpcProcessorTask.java @@ -47,11 +47,6 @@ public class NpcProcessorTask extends BukkitRunnable { if (npc.isVisibleTo(player)) npc.hide(player); continue; } - - if (npc.isBlacklisted(player)) { - continue; - } - double distance = player.getLocation().distanceSquared(npc.getBukkitLocation()); // visibility diff --git a/plugin/src/main/java/lol/pyr/znpcsplus/util/Viewable.java b/plugin/src/main/java/lol/pyr/znpcsplus/util/Viewable.java index 78978c1..27e4bad 100644 --- a/plugin/src/main/java/lol/pyr/znpcsplus/util/Viewable.java +++ b/plugin/src/main/java/lol/pyr/znpcsplus/util/Viewable.java @@ -22,7 +22,6 @@ public abstract class Viewable { } private final Set viewers = ConcurrentHashMap.newKeySet(); - private final Set blacklisted = ConcurrentHashMap.newKeySet(); public Viewable() { all.add(new WeakReference<>(this)); @@ -31,7 +30,6 @@ public abstract class Viewable { public void delete() { UNSAFE_hideAll(); viewers.clear(); - blacklisted.clear(); } public void respawn() { @@ -57,22 +55,8 @@ public abstract class Viewable { UNSAFE_hide(player); } - public void blacklist(Player player) { - blacklisted.add(player); - hide(player); - } - - public void unblacklist(Player player) { - blacklisted.remove(player); - } - - public boolean isBlacklisted(Player player) { - return blacklisted.contains(player); - } - public void UNSAFE_removeViewer(Player player) { viewers.remove(player); - blacklisted.remove(player); } protected void UNSAFE_hideAll() {