mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Add a sound effect for receiving a teleport request, close #333
This commit is contained in:
2 files changed
+5
-1
No files matched your search
@@ -493,7 +493,8 @@ public class Settings {
|
||||
public enum SoundEffectAction {
|
||||
TELEPORTATION_COMPLETE("entity.enderman.teleport"),
|
||||
TELEPORTATION_WARMUP("block.note_block.banjo"),
|
||||
TELEPORTATION_CANCELLED("entity.item.break");
|
||||
TELEPORTATION_CANCELLED("entity.item.break"),
|
||||
TELEPORT_REQUEST_RECEIVED("entity.experience_orb.pickup");
|
||||
private final String defaultSoundEffect;
|
||||
|
||||
SoundEffectAction(@NotNull String defaultSoundEffect) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package net.william278.huskhomes.manager;
|
||||
|
||||
import net.william278.huskhomes.HuskHomes;
|
||||
import net.william278.huskhomes.config.Settings;
|
||||
import net.william278.huskhomes.network.Message;
|
||||
import net.william278.huskhomes.network.Payload;
|
||||
import net.william278.huskhomes.teleport.Teleport;
|
||||
@@ -177,6 +178,8 @@ public class RequestsManager {
|
||||
.ifPresent(recipient::sendMessage);
|
||||
plugin.getLocales().getLocale("teleport_request_buttons", request.getRequesterName())
|
||||
.ifPresent(recipient::sendMessage);
|
||||
plugin.getSettings().getSoundEffect(Settings.SoundEffectAction.TELEPORT_REQUEST_RECEIVED)
|
||||
.ifPresent(recipient::playSound);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user