diff options
author | martimavocado <39881008+martimavocado@users.noreply.github.com> | 2024-04-13 07:55:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-13 08:55:48 +0200 |
commit | e3f1794b61cc4ad7a48b15ed1abb0b28eeaa71eb (patch) | |
tree | 755943bc28d95d29c3e1ca5f2df659ab45c7d761 /src/main/java/at/hannibal2/skyhanni/config | |
parent | 0d41a281c8d87128a0004fed96dada8b1b5e950a (diff) | |
download | skyhanni-e3f1794b61cc4ad7a48b15ed1abb0b28eeaa71eb.tar.gz skyhanni-e3f1794b61cc4ad7a48b15ed1abb0b28eeaa71eb.tar.bz2 skyhanni-e3f1794b61cc4ad7a48b15ed1abb0b28eeaa71eb.zip |
Feature: Mining Notifications (#1429)
Co-authored-by: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com>
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java | 5 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java | 46 |
2 files changed, 51 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java index 5beafceb0..92300f690 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningConfig.java @@ -37,6 +37,11 @@ public class MiningConfig { @ConfigOption(name = "Fossil Excavator", desc = "") @Accordion public FossilExcavatorConfig fossilExcavator = new FossilExcavatorConfig(); + + @Expose + @ConfigOption(name = "Notifications", desc = "") + @Accordion + public MiningNotificationsConfig notifications = new MiningNotificationsConfig(); @Expose @ConfigOption(name = "Highlight Commission Mobs", desc = "Highlight Mobs that are part of active commissions.") diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java new file mode 100644 index 000000000..59a74b879 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/mining/MiningNotificationsConfig.java @@ -0,0 +1,46 @@ +package at.hannibal2.skyhanni.config.features.mining; + +import at.hannibal2.skyhanni.config.FeatureToggle; +import at.hannibal2.skyhanni.features.mining.MiningNotifications.MiningNotificationList; +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorDraggableList; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; +import io.github.notenoughupdates.moulconfig.observer.Property; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class MiningNotificationsConfig { + @Expose + @ConfigOption(name = "Enabled", desc = "Toggles the Mining Notifications.") + @ConfigEditorBoolean + @FeatureToggle + public boolean enabled = false; + + @Expose + @ConfigOption( + name = "Notification List", + desc = "Drag text to change which events send a title." + ) + @ConfigEditorDraggableList + public List<MiningNotificationList> notifications = new ArrayList<>(Arrays.asList( + MiningNotificationList.MINESHAFT_SPAWN, + MiningNotificationList.SCRAP, + MiningNotificationList.COLD, + MiningNotificationList.GOLDEN_GOBLIN, + MiningNotificationList.DIAMOND_GOBLIN + )); + + @Expose + @ConfigOption(name = "Play Sound", desc = "Plays a ding when a notification is triggered.") + @ConfigEditorBoolean + public boolean playSound = true; + + @Expose + @ConfigOption(name = "Cold Threshold", desc = "Change when the Cold notification gets triggered.") + @ConfigEditorSlider(minValue = 1, maxValue = 100, minStep = 1) + public Property<Integer> coldThreshold = Property.of(50); +} |