From 8852ced19ce4c3b3150dd622d9b36cf7b4d6cab6 Mon Sep 17 00:00:00 2001 From: Brady Date: Mon, 26 Aug 2024 05:19:44 -0230 Subject: Feature: Remind Command (#1708) Co-authored-by: Zickles Co-authored-by: Cal Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com> --- .../hannibal2/skyhanni/config/commands/Commands.kt | 2 ++ .../skyhanni/config/features/misc/MiscConfig.java | 5 +++++ .../config/features/misc/RemindersConfig.java | 21 +++++++++++++++++++++ .../hannibal2/skyhanni/config/storage/Storage.java | 4 ++++ 4 files changed, 32 insertions(+) create mode 100644 src/main/java/at/hannibal2/skyhanni/config/features/misc/RemindersConfig.java (limited to 'src/main/java/at/hannibal2/skyhanni/config') diff --git a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt index fbd93a4d8..f021fe326 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt +++ b/src/main/java/at/hannibal2/skyhanni/config/commands/Commands.kt @@ -63,6 +63,7 @@ import at.hannibal2.skyhanni.features.misc.MarkedPlayerManager import at.hannibal2.skyhanni.features.misc.discordrpc.DiscordRPCManager import at.hannibal2.skyhanni.features.misc.limbo.LimboTimeTracker import at.hannibal2.skyhanni.features.misc.massconfiguration.DefaultConfigFeatures +import at.hannibal2.skyhanni.features.misc.reminders.ReminderManager import at.hannibal2.skyhanni.features.misc.update.UpdateManager import at.hannibal2.skyhanni.features.misc.visualwords.VisualWordGui import at.hannibal2.skyhanni.features.rift.area.westvillage.VerminTracker @@ -170,6 +171,7 @@ object Commands { { DefaultConfigFeatures.onCommand(it) }, DefaultConfigFeatures::onComplete, ) + registerCommand("shremind", "Set a reminder for yourself") { ReminderManager.command(it) } registerCommand("shwords", "Opens the config list for modifying visual words") { openVisualWords() } } diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java index 95d3281ec..54f0c7c50 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/MiscConfig.java @@ -107,6 +107,11 @@ public class MiscConfig { @Accordion public PatcherCoordsWaypointConfig patcherCoordsWaypoint = new PatcherCoordsWaypointConfig(); + @Expose + @ConfigOption(name = "Reminders", desc = "") + @Accordion + public RemindersConfig reminders = new RemindersConfig(); + @Expose @ConfigOption(name = "Show Outside SkyBlock", desc = "Show these features outside of SkyBlock.") @ConfigEditorDraggableList diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/misc/RemindersConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/misc/RemindersConfig.java new file mode 100644 index 000000000..fb7a9b785 --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/config/features/misc/RemindersConfig.java @@ -0,0 +1,21 @@ +package at.hannibal2.skyhanni.config.features.misc; + +import com.google.gson.annotations.Expose; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorBoolean; +import io.github.notenoughupdates.moulconfig.annotations.ConfigEditorSlider; +import io.github.notenoughupdates.moulconfig.annotations.ConfigOption; + +public class RemindersConfig { + @Expose + @ConfigOption(name = "Auto Delete Reminders", desc = "Automatically deletes reminders after they have been shown once.") + @ConfigEditorBoolean + public boolean autoDeleteReminders = false; + + @Expose + @ConfigOption( + name = "Reminder Interval", + desc = "The interval in minutes in which reminders are shown again, after they have been shown once." + ) + @ConfigEditorSlider(minValue = 0f, maxValue = 60f, minStep = 1f) + public float interval = 5f; +} diff --git a/src/main/java/at/hannibal2/skyhanni/config/storage/Storage.java b/src/main/java/at/hannibal2/skyhanni/config/storage/Storage.java index c37ba1dd0..252c9d8bb 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/storage/Storage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/storage/Storage.java @@ -1,5 +1,6 @@ package at.hannibal2.skyhanni.config.storage; +import at.hannibal2.skyhanni.features.misc.reminders.Reminder; import at.hannibal2.skyhanni.features.misc.visualwords.VisualWord; import at.hannibal2.skyhanni.utils.LorenzVec; import at.hannibal2.skyhanni.utils.tracker.SkyHanniTracker; @@ -50,4 +51,7 @@ public class Storage { @Expose public List blacklistedUsers = new ArrayList<>(); + + @Expose + public Map reminders = new HashMap<>(); } -- cgit