From 465257f11ad4d0c55b706fd3431bf636c8305b86 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Mon, 29 Sep 2014 13:18:01 +1300 Subject: [PATCH] Use isPlayerDisguise --- src/me/libraryaddict/disguise/DisguiseListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/me/libraryaddict/disguise/DisguiseListener.java b/src/me/libraryaddict/disguise/DisguiseListener.java index 27af91f0..53ba2d58 100644 --- a/src/me/libraryaddict/disguise/DisguiseListener.java +++ b/src/me/libraryaddict/disguise/DisguiseListener.java @@ -102,7 +102,7 @@ public class DisguiseListener implements Listener { if (newLoc != null) { for (HashSet list : DisguiseUtilities.getDisguises().values()) { for (TargetedDisguise disguise : list) { - if (disguise.getType() == DisguiseType.PLAYER && disguise.canSee(player) + if (disguise.isPlayerDisguise() && disguise.canSee(player) && ((PlayerDisguise) disguise).getWatcher().isSleeping() && DisguiseUtilities.getPerverts(disguise).contains(player)) { PacketContainer[] packets = DisguiseUtilities.getBedPackets(player, @@ -367,5 +367,5 @@ public class DisguiseListener implements Listener { disguiseRunnable.put(player, runnable); disguiseEntity.put(player, disguise); } - + }