From 3db3627ec03baa134940a92e596e591f2d88aa0c Mon Sep 17 00:00:00 2001 From: David Cole <40234707+DavidArthurCole@users.noreply.github.com> Date: Sun, 8 Sep 2024 03:29:27 -0400 Subject: Feature: Hoppity Call Warning (#2272) Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../event/hoppity/HoppityCallWarningConfig.java | 47 ++++++++++++++++++++++ .../features/event/hoppity/HoppityEggsConfig.java | 5 +++ 2 files changed, 52 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/event/hoppity/HoppityCallWarningConfig.java (limited to 'src/main/java/at/hannibal2/skyhanni/config') diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/hoppity/HoppityCallWarningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/hoppity/HoppityCallWarningConfig.java new file mode 100644 index 000000000..6e4ccf027 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/hoppity/HoppityCallWarningConfig.java @@ -0,0 +1,47 @@ +package at.hannibal2.skyhanni.config.features.event.hoppity; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.utils.OSUtils; +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorButton; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorColour; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorKeybind; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorText; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; +import io.github.notenoughupdates.moulconfig.observer.Property; +import org.lwjgl.input.Keyboard; + +public class HoppityCallWarningConfig { + + @Expose + @ConfigOption(name = "Hoppity Call Warning", desc = "Warn when hoppity is calling you.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = true; + + @Expose + @ConfigOption( + name = "Accept Call Hotkey", + desc = "Accept the call from hoppity by pressing this keybind." + ) + @ConfigEditorKeybind(defaultKey = Keyboard.KEY_NONE) + public int acceptHotkey = Keyboard.KEY_NONE; + + @Expose + @ConfigOption(name = "Warning Sound", desc = "The sound that plays when hoppity calls.\n" + + "§eYou can use custom sounds, put it in the §bskyhanni/sounds §efolder in your resource pack.\n" + + "§eThen write §bskyhanni:yourfilename\n" + + "§cMust be a .ogg file") + @ConfigEditorText + public Property hoppityCallSound = Property.of("note.pling"); + + @Expose + @ConfigOption(name = "Flash Color", desc = "Color of the screen when flashing") + @ConfigEditorColour + public String flashColor = "0:127:0:238:255"; + + @ConfigOption(name = "Sounds", desc = "Click to open the list of available sounds.") + @ConfigEditorButton(buttonText = "OPEN") + public Runnable sounds = () -> OSUtils.openBrowser("https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/mapping-and-modding-tutorials/2213619-1-8-all-playsound-sound-arguments"); +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/event/hoppity/HoppityEggsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/event/hoppity/HoppityEggsConfig.java index 50a5731a5..c270dae8b 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/event/hoppity/HoppityEggsConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/event/hoppity/HoppityEggsConfig.java @@ -14,6 +14,11 @@ import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; public class HoppityEggsConfig { + @Expose + @ConfigOption(name = "Hoppity Abiphone Calls", desc = "") + @Accordion + public HoppityCallWarningConfig hoppityCallWarning = new HoppityCallWarningConfig(); + @Expose @ConfigOption(name = "Event Summary", desc = "") @Accordion -- cgit