diff --git a/Changelog.txt b/Changelog.txt index 6cbbb734d..c515b8871 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -15,6 +15,7 @@ Version 2.1.0 + Added links to mcMMO related websites to various commands + Certain elements of mcMMO's UI have been restyled + Added the tagline "Overhaul Era" to various locations until 3.0.0 comes out + + (Config) Added option to disable the new URL links to config.yml + (Config) New config file added coreskills.yml + (Config) Added rank settings for the new Woodcutting skill + (Config) Added configurable parameters for the new Tree Feller diff --git a/src/main/java/com/gmail/nossr50/config/Config.java b/src/main/java/com/gmail/nossr50/config/Config.java index a718c5120..a440a44d2 100644 --- a/src/main/java/com/gmail/nossr50/config/Config.java +++ b/src/main/java/com/gmail/nossr50/config/Config.java @@ -446,6 +446,7 @@ public class Config extends AutoUpdateConfigLoader { */ /* General Settings */ + public boolean getUrlLinksEnabled() { return config.getBoolean("Commands.Skills.URL_Links"); } public boolean getAbilityMessagesEnabled() { return config.getBoolean("Abilities.Messages", true); } public boolean getAbilitiesEnabled() { return config.getBoolean("Abilities.Enabled", true); } public boolean getAbilitiesOnlyActivateWhenSneaking() { return config.getBoolean("Abilities.Activation.Only_Activate_When_Sneaking", false); } diff --git a/src/main/java/com/gmail/nossr50/util/TextComponentFactory.java b/src/main/java/com/gmail/nossr50/util/TextComponentFactory.java index 5ba5fae0d..9ca027e39 100644 --- a/src/main/java/com/gmail/nossr50/util/TextComponentFactory.java +++ b/src/main/java/com/gmail/nossr50/util/TextComponentFactory.java @@ -2,6 +2,7 @@ package com.gmail.nossr50.util; import com.gmail.nossr50.commands.skills.McMMOWebLinks; import com.gmail.nossr50.config.AdvancedConfig; +import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.interactions.NotificationType; import com.gmail.nossr50.datatypes.json.McMMOUrl; import com.gmail.nossr50.datatypes.skills.PrimarySkill; @@ -32,6 +33,9 @@ public class TextComponentFactory { } public static void sendPlayerUrlHeader(Player player) { + if(!Config.getInstance().getUrlLinksEnabled()) + return; + Player.Spigot spigotPlayer = player.spigot(); if(webComponents != null) diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index f52fa1cec..373c1060e 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -476,6 +476,9 @@ Double_Drops: # Settings for commands ### Commands: + Skills: + # Turn this off to prevent mcMMO URL links from being sent + URL_Links: true Generic: # If true, when using partial names in commands mcMMO will try to look for a match from # the offline players. Enabling this might slow the server down if there are a lot of offline players.