package net.knarcraft.blacksmith.util; import net.knarcraft.blacksmith.BlacksmithPlugin; import net.knarcraft.blacksmith.config.Setting; import net.knarcraft.blacksmith.config.SettingValueType; import net.knarcraft.blacksmith.config.Settings; import net.knarcraft.blacksmith.formatting.BlacksmithTranslatableMessage; import net.knarcraft.knarlib.formatting.StringFormatter; import net.md_5.bungee.api.ChatColor; import org.bukkit.command.CommandSender; import org.jetbrains.annotations.NotNull; import java.util.Arrays; import static net.knarcraft.blacksmith.formatting.BlacksmithTranslatableMessage.getCurrentValueMessage; import static net.knarcraft.blacksmith.formatting.BlacksmithTranslatableMessage.getDefaultValueMessage; import static net.knarcraft.blacksmith.formatting.BlacksmithTranslatableMessage.getValueChangedMessage; /** * A helper class for the configuration command */ public final class ConfigCommandHelper { private ConfigCommandHelper() { } /** * Changes the value of the setting defined in the user's input * * @param args
The arguments given by the user
* @param detectedSettingThe setting recognized from the input, if any
* @param settingsThe global settings object to get settings from
* @param senderThe command sender to display any output to
*/ public staticThe global setting recognized from the input
* @param settingsThe global settings object to get settings from
* @param senderThe command sender to display any output to
*/ public staticThe sender to display the raw value to
* @param valueThe value to display raw
*/ public static void displayRaw(@NotNull CommandSender sender, @NotNull String value) { sender.sendMessage(BlacksmithTranslatableMessage.getRawValueMessage( value.replace(ChatColor.COLOR_CHAR, '&'))); } }