mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-22 23:31:37 +01:00
Add convinence playSound method in instance
This commit is contained in:
parent
89a09f326e
commit
5aa8b97c60
@ -3,6 +3,7 @@ package net.minestom.server.instance;
|
|||||||
import it.unimi.dsi.fastutil.objects.ObjectArraySet;
|
import it.unimi.dsi.fastutil.objects.ObjectArraySet;
|
||||||
import net.kyori.adventure.identity.Identity;
|
import net.kyori.adventure.identity.Identity;
|
||||||
import net.kyori.adventure.pointer.Pointers;
|
import net.kyori.adventure.pointer.Pointers;
|
||||||
|
import net.kyori.adventure.sound.Sound;
|
||||||
import net.minestom.server.MinecraftServer;
|
import net.minestom.server.MinecraftServer;
|
||||||
import net.minestom.server.ServerProcess;
|
import net.minestom.server.ServerProcess;
|
||||||
import net.minestom.server.Tickable;
|
import net.minestom.server.Tickable;
|
||||||
@ -693,6 +694,15 @@ public abstract class Instance implements Block.Getter, Block.Setter,
|
|||||||
this.explosionSupplier = supplier;
|
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.
|
* Gets the instance space.
|
||||||
* <p>
|
* <p>
|
||||||
|
Loading…
Reference in New Issue
Block a user