From 7d1cbe4c4547ea7a6e1c33b94ab80485755a7640 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 28 Mar 2019 23:29:37 -0700 Subject: [PATCH] notifications pt 1 --- .../ActionBarNotificationSetting.java | 13 +++++++++++++ .../ConfigActionBarNotifications.java | 18 ++++++++++++++++++ .../notifications/ConfigNotifications.java | 4 ++++ 3 files changed, 35 insertions(+) create mode 100644 src/main/java/com/gmail/nossr50/config/hocon/notifications/ActionBarNotificationSetting.java create mode 100644 src/main/java/com/gmail/nossr50/config/hocon/notifications/ConfigActionBarNotifications.java diff --git a/src/main/java/com/gmail/nossr50/config/hocon/notifications/ActionBarNotificationSetting.java b/src/main/java/com/gmail/nossr50/config/hocon/notifications/ActionBarNotificationSetting.java new file mode 100644 index 000000000..7f8fb7024 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/config/hocon/notifications/ActionBarNotificationSetting.java @@ -0,0 +1,13 @@ +package com.gmail.nossr50.config.hocon.notifications; + +public class ActionBarNotificationSetting { + + public ActionBarNotificationSetting(boolean enabled, boolean sendCopyOfMessageToChat) + { + this.enabled = enabled; + this.sendCopyOfMessageToChat = sendCopyOfMessageToChat; + } + + public boolean enabled; + public boolean sendCopyOfMessageToChat; +} \ No newline at end of file diff --git a/src/main/java/com/gmail/nossr50/config/hocon/notifications/ConfigActionBarNotifications.java b/src/main/java/com/gmail/nossr50/config/hocon/notifications/ConfigActionBarNotifications.java new file mode 100644 index 000000000..2f0159ce8 --- /dev/null +++ b/src/main/java/com/gmail/nossr50/config/hocon/notifications/ConfigActionBarNotifications.java @@ -0,0 +1,18 @@ +package com.gmail.nossr50.config.hocon.notifications; + +import com.gmail.nossr50.datatypes.interactions.NotificationType; +import ninja.leaping.configurate.objectmapping.Setting; +import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; + +import java.util.HashMap; + +@ConfigSerializable +public class ConfigActionBarNotifications { + + @Setting(value = "Notification-Settings") + private HashMap notificationSettingHashMap; + + public HashMap getNotificationSettingHashMap() { + return notificationSettingHashMap; + } +} \ No newline at end of file diff --git a/src/main/java/com/gmail/nossr50/config/hocon/notifications/ConfigNotifications.java b/src/main/java/com/gmail/nossr50/config/hocon/notifications/ConfigNotifications.java index 5f0963f9d..8fd7dae92 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/notifications/ConfigNotifications.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/notifications/ConfigNotifications.java @@ -15,4 +15,8 @@ public class ConfigNotifications { public boolean isSuperAbilityToolMessage() { return superAbilityToolMessage; } + + @Setting(value = "Action-Bar-Notifications", comment = "Settings related to action bar messages." + + "\nThe action bar is the area above your health and armor.") + public ConfigActionBarNotifications actionBarNotifications = new ConfigActionBarNotifications(); }