mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 23:47:59 +01:00
Implement Sound.Source.Provider
This commit is contained in:
parent
80a5356711
commit
e7e0d4cb0d
@ -1,14 +1,13 @@
|
||||
package net.minestom.server.sound;
|
||||
|
||||
import net.kyori.adventure.sound.Sound;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import static net.kyori.adventure.sound.Sound.*;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link Source}
|
||||
* @deprecated Use {@link Sound.Source}
|
||||
*/
|
||||
@Deprecated
|
||||
public enum SoundCategory {
|
||||
public enum SoundCategory implements Sound.Source.Provider {
|
||||
MASTER,
|
||||
MUSIC,
|
||||
RECORDS,
|
||||
@ -24,8 +23,15 @@ public enum SoundCategory {
|
||||
* Gets the Adventure source representing this sound category.
|
||||
*
|
||||
* @return the source
|
||||
* @deprecated Use {@link #soundSource()}
|
||||
*/
|
||||
public @NotNull Source asSource() {
|
||||
return Source.values()[this.ordinal()];
|
||||
@Deprecated
|
||||
public @NotNull Sound.Source asSource() {
|
||||
return this.soundSource();
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Sound.Source soundSource() {
|
||||
return Sound.Source.values()[this.ordinal()];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user