Fixed EntitySoundEffectPacket name

This commit is contained in:
Felix Cravic 2020-12-12 05:52:03 +01:00
parent 7da5550858
commit c8154b564f
2 changed files with 8 additions and 8 deletions

View File

@ -919,13 +919,13 @@ public class Player extends LivingEntity implements CommandSender {
* @param pitch the pitch of the sound, between 0.5 and 2.0
*/
public void playSound(@NotNull Sound sound, @NotNull SoundCategory soundCategory, float volume, float pitch) {
EntitySoundEffect entitySoundEffect = new EntitySoundEffect();
entitySoundEffect.entityId = getEntityId();
entitySoundEffect.soundId = sound.getId();
entitySoundEffect.soundCategory = soundCategory;
entitySoundEffect.volume = volume;
entitySoundEffect.pitch = pitch;
playerConnection.sendPacket(entitySoundEffect);
EntitySoundEffectPacket entitySoundEffectPacket = new EntitySoundEffectPacket();
entitySoundEffectPacket.entityId = getEntityId();
entitySoundEffectPacket.soundId = sound.getId();
entitySoundEffectPacket.soundCategory = soundCategory;
entitySoundEffectPacket.volume = volume;
entitySoundEffectPacket.pitch = pitch;
playerConnection.sendPacket(entitySoundEffectPacket);
}
/**

View File

@ -6,7 +6,7 @@ import net.minestom.server.sound.SoundCategory;
import net.minestom.server.utils.binary.BinaryWriter;
import org.jetbrains.annotations.NotNull;
public class EntitySoundEffect implements ServerPacket {
public class EntitySoundEffectPacket implements ServerPacket {
public int soundId;
public SoundCategory soundCategory;