Cancel the 'not sleeping' animation if he is disguised as sleeping

This commit is contained in:
libraryaddict 2014-01-03 07:59:56 +13:00
parent 7629496597
commit 5938672ba3

View File

@ -1148,7 +1148,9 @@ public class PacketsManager {
// Else if the disguise is attempting to send players a forbidden packet // Else if the disguise is attempting to send players a forbidden packet
else if (sentPacket.getType() == PacketType.Play.Server.ANIMATION) { else if (sentPacket.getType() == PacketType.Play.Server.ANIMATION) {
if (disguise.getType().isMisc() || (packets[0].getIntegers().read(1) == 3 && !disguise.getType().isPlayer())) { if (disguise.getType().isMisc()
|| (packets[0].getIntegers().read(1) == 3 && (!disguise.getType().isPlayer() || ((PlayerWatcher) disguise
.getWatcher()).isSleeping()))) {
packets = new PacketContainer[0]; packets = new PacketContainer[0];
} }
} }