Since we can't do anything. Just ignore all async sound packets

This commit is contained in:
libraryaddict 2014-07-28 22:15:11 +12:00
parent 2c101cef8b
commit d7834e467f

View File

@ -506,6 +506,9 @@ public class PacketsManager {
StructureModifier<Object> mods = event.getPacket().getModifier(); StructureModifier<Object> mods = event.getPacket().getModifier();
Player observer = event.getPlayer(); Player observer = event.getPlayer();
if (event.getPacketType() == PacketType.Play.Server.NAMED_SOUND_EFFECT) { if (event.getPacketType() == PacketType.Play.Server.NAMED_SOUND_EFFECT) {
if (event.isAsync()) {
return;
}
String soundName = (String) mods.read(0); String soundName = (String) mods.read(0);
SoundType soundType = null; SoundType soundType = null;
Location soundLoc = new Location(observer.getWorld(), ((Integer) mods.read(1)) / 8D, Location soundLoc = new Location(observer.getWorld(), ((Integer) mods.read(1)) / 8D,