mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 16:37:38 +01:00
Implement Sound.Source.Provider
This commit is contained in:
parent
80a5356711
commit
e7e0d4cb0d
@ -1,14 +1,13 @@
|
|||||||
package net.minestom.server.sound;
|
package net.minestom.server.sound;
|
||||||
|
|
||||||
|
import net.kyori.adventure.sound.Sound;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import static net.kyori.adventure.sound.Sound.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated Use {@link Source}
|
* @deprecated Use {@link Sound.Source}
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public enum SoundCategory {
|
public enum SoundCategory implements Sound.Source.Provider {
|
||||||
MASTER,
|
MASTER,
|
||||||
MUSIC,
|
MUSIC,
|
||||||
RECORDS,
|
RECORDS,
|
||||||
@ -24,8 +23,15 @@ public enum SoundCategory {
|
|||||||
* Gets the Adventure source representing this sound category.
|
* Gets the Adventure source representing this sound category.
|
||||||
*
|
*
|
||||||
* @return the source
|
* @return the source
|
||||||
|
* @deprecated Use {@link #soundSource()}
|
||||||
*/
|
*/
|
||||||
public @NotNull Source asSource() {
|
@Deprecated
|
||||||
return Source.values()[this.ordinal()];
|
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