The new URL links can now be disabled in config.yml

This commit is contained in:
nossr50 2019-01-11 02:24:11 -08:00
parent 1e8d950767
commit adc83d29a7
4 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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); }

View File

@ -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)

View File

@ -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.