Fix 1.7 self disguises sounds not playing properly
This commit is contained in:
parent
95e28757b7
commit
a178fbace7
@ -612,7 +612,7 @@ public class PacketsManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (event.getPacketType() == PacketType.Play.Server.ENTITY_STATUS) {
|
} else if (event.getPacketType() == PacketType.Play.Server.ENTITY_STATUS) {
|
||||||
if ((Byte) mods.read(1) == 1) {
|
if ((Byte) mods.read(1) == 2) {
|
||||||
// It made a damage animation
|
// It made a damage animation
|
||||||
Entity entity = event.getPacket().getEntityModifier(observer.getWorld()).read(0);
|
Entity entity = event.getPacket().getEntityModifier(observer.getWorld()).read(0);
|
||||||
Disguise disguise = DisguiseAPI.getDisguise(observer, entity);
|
Disguise disguise = DisguiseAPI.getDisguise(observer, entity);
|
||||||
@ -689,7 +689,7 @@ public class PacketsManager {
|
|||||||
PacketType.Play.Server.ENTITY_HEAD_ROTATION, PacketType.Play.Server.ENTITY_METADATA,
|
PacketType.Play.Server.ENTITY_HEAD_ROTATION, PacketType.Play.Server.ENTITY_METADATA,
|
||||||
PacketType.Play.Server.ENTITY_EQUIPMENT, PacketType.Play.Server.ANIMATION, PacketType.Play.Server.BED,
|
PacketType.Play.Server.ENTITY_EQUIPMENT, PacketType.Play.Server.ANIMATION, PacketType.Play.Server.BED,
|
||||||
PacketType.Play.Server.ENTITY_EFFECT, PacketType.Play.Server.ENTITY_VELOCITY,
|
PacketType.Play.Server.ENTITY_EFFECT, PacketType.Play.Server.ENTITY_VELOCITY,
|
||||||
PacketType.Play.Server.UPDATE_ATTRIBUTES) {
|
PacketType.Play.Server.UPDATE_ATTRIBUTES, PacketType.Play.Server.ENTITY_STATUS) {
|
||||||
@Override
|
@Override
|
||||||
public void onPacketSending(PacketEvent event) {
|
public void onPacketSending(PacketEvent event) {
|
||||||
final Player observer = event.getPlayer();
|
final Player observer = event.getPlayer();
|
||||||
@ -764,12 +764,12 @@ public class PacketsManager {
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* case PacketType.Play.Server.ENTITY_STATUS:
|
else if (event.getPacketType() == PacketType.Play.Server.ENTITY_STATUS) {
|
||||||
if (DisguiseAPI.getDisguise(entity).canHearSelfDisguise()
|
if (DisguiseAPI.getDisguise(event.getPlayer(), event.getPlayer()).isSelfDisguiseSoundsReplaced()
|
||||||
&& (Byte) event.getPacket().getModifier().read(1) == 1) {
|
&& (Byte) event.getPacket().getModifier().read(1) == 2) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
break;*/
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user