Add convinence playSound method in instance

This commit is contained in:
GreatWyrm 2022-08-01 16:43:57 -07:00 committed by Matt Worzala
parent 89a09f326e
commit 5aa8b97c60

View File

@ -3,6 +3,7 @@ package net.minestom.server.instance;
import it.unimi.dsi.fastutil.objects.ObjectArraySet;
import net.kyori.adventure.identity.Identity;
import net.kyori.adventure.pointer.Pointers;
import net.kyori.adventure.sound.Sound;
import net.minestom.server.MinecraftServer;
import net.minestom.server.ServerProcess;
import net.minestom.server.Tickable;
@ -693,6 +694,15 @@ public abstract class Instance implements Block.Getter, Block.Setter,
this.explosionSupplier = supplier;
}
/**
* Plays a {@link Sound} at a given point
* @param sound The sound to play
* @param point The point in this instance at which to play the sound
*/
public void playSound(@NotNull Sound sound, @NotNull Point point) {
playSound(sound, point.x(), point.y(), point.z());
}
/**
* Gets the instance space.
* <p>