diff --git a/src/main/java/com/gmail/nossr50/config/hocon/notifications/ConfigNotificationGeneral.java b/src/main/java/com/gmail/nossr50/config/hocon/notifications/ConfigNotificationGeneral.java index 888a90563..99fd360c9 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/notifications/ConfigNotificationGeneral.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/notifications/ConfigNotificationGeneral.java @@ -6,10 +6,19 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; @ConfigSerializable public class ConfigNotificationGeneral { - public static final boolean PLAYER_TIPS_DEFAULT = true; + private static final boolean PLAYER_TIPS_DEFAULT = true; + public static final boolean PROFILE_LOADED_DEFAULT = false; @Setting(value = "Player-Tips", comment = "Allows mcMMO to send players automated helpful tips." + "\n Default value: " + PLAYER_TIPS_DEFAULT) - public boolean playerTips = PLAYER_TIPS_DEFAULT; + private boolean playerTips = PLAYER_TIPS_DEFAULT; + + @Setting(value = "Show-Profile-Loaded-Message", comment = "If set to true, players will be shown a message when their profile has been loaded." + + "\nDefault value: "+PROFILE_LOADED_DEFAULT) + private boolean showProfileLoadedMessage = PROFILE_LOADED_DEFAULT; + + public boolean isShowProfileLoadedMessage() { + return showProfileLoadedMessage; + } public boolean isPlayerTips() { return playerTips; 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 700449e2a..163358e18 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 @@ -6,16 +6,33 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; @ConfigSerializable public class ConfigNotifications { - public static final boolean SUPER_ABILITY_TOOL_NOTIFICATION_DEFAULT = true; + private static final boolean SUPER_ABILITY_TOOL_NOTIFICATION_DEFAULT = true; + @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(); + private ConfigActionBarNotifications actionBarNotifications = new ConfigActionBarNotifications(); + + @Setting(value = "General", comment = "General settings for Notifications") - public ConfigNotificationGeneral configNotificationGeneral = new ConfigNotificationGeneral(); + private ConfigNotificationGeneral configNotificationGeneral = new ConfigNotificationGeneral(); + @Setting(value = "Super-Ability-Tool-Raising-Lowering-Notification", comment = "Notifies the player when they go into the tool readying state for super abilities.") private boolean superAbilityToolMessage = SUPER_ABILITY_TOOL_NOTIFICATION_DEFAULT; + + public boolean isShowProfileLoadedMessage() { + return configNotificationGeneral.isShowProfileLoadedMessage(); + } + + public boolean isPlayerTips() { + return configNotificationGeneral.isPlayerTips(); + } + + public static boolean isSuperAbilityToolNotificationDefault() { + return SUPER_ABILITY_TOOL_NOTIFICATION_DEFAULT; + } + public boolean isSuperAbilityToolMessage() { return superAbilityToolMessage; } diff --git a/src/main/java/com/gmail/nossr50/config/hocon/skills/ranks/ConfigRanksSalvage.java b/src/main/java/com/gmail/nossr50/config/hocon/skills/ranks/ConfigRanksSalvage.java index 8428aa938..62a99117b 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/skills/ranks/ConfigRanksSalvage.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/skills/ranks/ConfigRanksSalvage.java @@ -6,14 +6,14 @@ import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; @ConfigSerializable public class ConfigRanksSalvage { - @Setting(value = "Advanced-Salvage") - private SkillRankProperty advancedSalvage = new SkillRankProperty(35); + @Setting(value = "Scrap-Collector") + private SkillRankProperty scrapCollector = new SkillRankProperty(2, 10, 15, 20, 25, 30, 35, 40); @Setting(value = "Arcane-Salvage") private SkillRankProperty arcaneSalvage = new SkillRankProperty(10, 25, 35, 50, 65, 75, 85, 100); - public SkillRankProperty getAdvancedSalvage() { - return advancedSalvage; + public SkillRankProperty getScrapCollector() { + return scrapCollector; } public SkillRankProperty getArcaneSalvage() { diff --git a/src/main/java/com/gmail/nossr50/runnables/player/PlayerProfileLoadingTask.java b/src/main/java/com/gmail/nossr50/runnables/player/PlayerProfileLoadingTask.java index 623028c56..5acb8352a 100644 --- a/src/main/java/com/gmail/nossr50/runnables/player/PlayerProfileLoadingTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/player/PlayerProfileLoadingTask.java @@ -91,7 +91,7 @@ public class PlayerProfileLoadingTask extends BukkitRunnable { } } - if (MainConfig.getInstance().getShowProfileLoadedMessage()) { + if (mcMMO.getConfigManager().getConfigNotifications().isShowProfileLoadedMessage()) { player.sendMessage(LocaleLoader.getString("Profile.Loading.Success")); }