mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2025-01-30 23:01:50 +01:00
Refuse to handle null sounds
This commit is contained in:
parent
29673b7dd3
commit
ab63cdbbd9
@ -42,7 +42,6 @@ public class PacketListenerSounds extends SimplePacketListenerAbstract {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Sound sound;
|
||||
float volume;
|
||||
float pitch;
|
||||
@ -57,6 +56,11 @@ public class PacketListenerSounds extends SimplePacketListenerAbstract {
|
||||
volume = soundEffect.getVolume();
|
||||
pitch = soundEffect.getPitch();
|
||||
sound = soundEffect.getSound();
|
||||
|
||||
if (sound == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
String soundKey = NmsVersion.v1_16.isSupported() ? sound.getSoundId().toString() : sound.getSoundId().getKey();
|
||||
|
||||
Vector3i loc = soundEffect.getEffectPosition();
|
||||
@ -106,6 +110,10 @@ public class PacketListenerSounds extends SimplePacketListenerAbstract {
|
||||
pitch = entitySoundEffect.getPitch();
|
||||
sound = entitySoundEffect.getSound();
|
||||
|
||||
if (sound == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
disguise = DisguiseUtilities.getDisguise(observer, entitySoundEffect.getEntityId());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user