Fix when non-living entities make a sound but server cant handle

This commit is contained in:
libraryaddict 2016-09-09 15:28:06 +12:00
parent 802c14cb75
commit 6962955c3a

View File

@ -155,7 +155,7 @@ public class PacketListenerSounds extends PacketAdapter
Class clazz = ReflectionManager.getNmsClass("DamageSource");
hasInvun = (Boolean) ReflectionManager.getNmsMethod("Entity", "isInvulnerable", clazz)
.invoke(nmsEntity, ReflectionManager.getNmsField(clazz, "GENERIC"));
.invoke(nmsEntity, ReflectionManager.getNmsField(clazz, "GENERIC").get(null));
}
}
catch (Exception ex)