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) { if (newLoc != null) {
for (HashSet<TargetedDisguise> list : DisguiseUtilities.getDisguises().values()) { for (HashSet<TargetedDisguise> list : DisguiseUtilities.getDisguises().values()) {
for (TargetedDisguise disguise : list) { for (TargetedDisguise disguise : list) {
if (disguise.getType() == DisguiseType.PLAYER && disguise.canSee(player) if (disguise.isPlayerDisguise() && disguise.canSee(player)
&& ((PlayerDisguise) disguise).getWatcher().isSleeping() && ((PlayerDisguise) disguise).getWatcher().isSleeping()
&& DisguiseUtilities.getPerverts(disguise).contains(player)) { && DisguiseUtilities.getPerverts(disguise).contains(player)) {
PacketContainer[] packets = DisguiseUtilities.getBedPackets(player, PacketContainer[] packets = DisguiseUtilities.getBedPackets(player,