Add playSound with position to Player (#1676)

This commit is contained in:
emortaldev 2023-01-09 00:38:30 +00:00 committed by GitHub
parent 84846f663b
commit 8eb089bf3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -705,6 +705,10 @@ public class Player extends LivingEntity implements CommandSender, Localizable,
this.playSound(sound, this.position.x(), this.position.y(), this.position.z());
}
public void playSound(@NotNull Sound sound, @NotNull Point point) {
sendPacket(AdventurePacketConvertor.createSoundPacket(sound, point.x(), point.y(), point.z()));
}
@Override
public void playSound(@NotNull Sound sound, double x, double y, double z) {
sendPacket(AdventurePacketConvertor.createSoundPacket(sound, x, y, z));