mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Add sound effects
This commit is contained in:
1 parent
7b1930e554
commit
7d4dc6f11d
5 files changed
+33
-4
No files matched your search
@@ -129,6 +129,9 @@ public class Settings {
|
||||
);
|
||||
|
||||
public Optional<String> getSoundEffect(@NotNull SoundEffectAction action) {
|
||||
if (!playSoundEffects) {
|
||||
return Optional.empty();
|
||||
}
|
||||
return Optional.ofNullable(soundEffects.get(action.name().toLowerCase()));
|
||||
}
|
||||
|
||||
@@ -271,9 +274,9 @@ public class Settings {
|
||||
* Represents the sound effect to play when an action happens
|
||||
*/
|
||||
public enum SoundEffectAction {
|
||||
TELEPORTATION_COMPLETE("entity_enderman_teleport"),
|
||||
TELEPORTATION_WARMUP("block_note_block_banjo"),
|
||||
TELEPORTATION_CANCELLED("entity_item_break");
|
||||
TELEPORTATION_COMPLETE("entity.enderman.teleport"),
|
||||
TELEPORTATION_WARMUP("block.note_block.banjo"),
|
||||
TELEPORTATION_CANCELLED("entity.item.break");
|
||||
private final String defaultSoundEffect;
|
||||
|
||||
SoundEffectAction(@NotNull String defaultSoundEffect) {
|
||||
|
||||
Reference in new issue
Block a user