Use isPlayerDisguise

This commit is contained in:
libraryaddict 2014-09-29 13:18:01 +13:00
parent a3b67b9a4f
commit 465257f11a

View File

@ -102,7 +102,7 @@ public class DisguiseListener implements Listener {
if (newLoc != null) {
for (HashSet<TargetedDisguise> 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);
}
}