package com.alttd.playerutils.config; import com.alttd.playerutils.util.Logger; import java.io.File; import java.util.List; public class Messages extends AbstractConfig { static Messages config; private final Logger logger; Messages(Logger logger) { super( new File(File.separator + "mnt" + File.separator + "configs" + File.separator + "PlayerUtils"), "messages.yml", logger); this.logger = logger; } public static void reload(Logger logger) { config = new Messages(logger); config.readConfig(Messages.class, null); } public static class HELP { private static final String prefix = "help."; public static String HELP_MESSAGE_WRAPPER = "PlayerUtils help:\n"; public static String HELP_MESSAGE = "Show this menu: /pu help"; public static String GLOW = "Glow in a specified color: /pu glow "; public static String XP_CHEQUE = "Create an XP cheque: /pu xpcheque [amount]"; public static String XP_CALC = "Calculate the amount of XP between levels: /pu xpcalc "; public static String RELOAD = "Reload the configs for PlayerUtils: /pu reload"; public static String ROTATE_BLOCK = "Enable rotating blocks with a blaze rod: /pu rotateblock"; public static String KEY = "Receive a key that you are owed: /pu key"; @SuppressWarnings("unused") private static void load() { HELP_MESSAGE_WRAPPER = config.getString(prefix, "help-wrapper", HELP_MESSAGE_WRAPPER); HELP_MESSAGE = config.getString(prefix, "help", HELP_MESSAGE); GLOW = config.getString(prefix, "glow", GLOW); XP_CHEQUE = config.getString(prefix, "xp-cheque", XP_CHEQUE); XP_CALC = config.getString(prefix, "xp-calc", XP_CALC); RELOAD = config.getString(prefix, "reload", RELOAD); ROTATE_BLOCK = config.getString(prefix, "rotate-block", ROTATE_BLOCK); } } public static class GENERIC { private static final String prefix = "generic."; public static String NO_PERMISSION = "'>You don't have permission for this command"; public static String PLAYER_ONLY = "This command can only be executed as a player"; public static String PLAYER_NOT_FOUND = "Unable to find online player "; @SuppressWarnings("unused") private static void load() { NO_PERMISSION = config.getString(prefix, "no-permission", NO_PERMISSION); PLAYER_ONLY = config.getString(prefix, "player-only", PLAYER_ONLY); PLAYER_NOT_FOUND = config.getString(prefix, "player-only", PLAYER_NOT_FOUND); } } public static class GLOW { private static final String prefix = "pu-command.glow"; public static String GLOW_OFF = "Glow turned off"; public static String GLOW_ON = "Glow turned on, you are now glowing "; public static String UNABLE_TO_GET_SCOREBOARD = "Unable to get scoreboard for team"; public static String GLOW_OFF_FOR_PLAYER = "Glow turned off for "; public static String GLOW_ON_FOR_PLAYER = "Glow turned on for they are now glowing "; @SuppressWarnings("unused") private static void load() { GLOW_OFF = config.getString(prefix, "glow-off",GLOW_OFF); GLOW_ON = config.getString(prefix, "glow-on",GLOW_ON); UNABLE_TO_GET_SCOREBOARD = config.getString(prefix, "unable-to-get-scoreboard",UNABLE_TO_GET_SCOREBOARD); } } public static class XP_CHEQUE { private static final String prefix = "pu-command.xp-cheque."; public static String FAILED_STORAGE = "Unable to create custom item for XP cheque"; public static String NEGATIVE = "You cannot enter a negative value for XP."; public static String NOT_ENOUGH_XP = "Not enough XP, you have "; public static String NOT_HOLDING_BOTTLE = "You need to hold an empty glass bottle while executing this command"; public static String DISPLAY_NAME = "XP bottle containing XP"; public static List LORE = List.of("Issued by ", "Throw to retrieve XP"); public static String NOT_ENOUGH_BOTTLE = "You need to be holding glass bottles"; public static String INVALID_AMOUNT = "You can only create between 1 and 64 xp cheque's at a time"; @SuppressWarnings("unused") private static void load() { FAILED_STORAGE = config.getString(prefix, "failed-storage", FAILED_STORAGE); NEGATIVE = config.getString(prefix, "negative", NEGATIVE); NOT_ENOUGH_XP = config.getString(prefix, "not-enough-xp", NOT_ENOUGH_XP); NOT_HOLDING_BOTTLE = config.getString(prefix, "not-holding-bottle", NOT_HOLDING_BOTTLE); DISPLAY_NAME = config.getString(prefix, "display-name", DISPLAY_NAME); LORE = config.getStringList(prefix, "lore", LORE); NOT_ENOUGH_BOTTLE = config.getString(prefix, "not-enough-bottle", NOT_ENOUGH_BOTTLE); INVALID_AMOUNT = config.getString(prefix, "invalid-amount", INVALID_AMOUNT); } } public static class XP_CALC { private static final String prefix = "pu-command.xp-cheque."; public static String XP_NEEDED = "Xp needed ."; @SuppressWarnings("unused") private static void load() { XP_NEEDED = config.getString(prefix, "xp-needed", XP_NEEDED); } } public static class RELOAD { private static final String prefix = "pu-command.reload."; public static String RELOADED = "Reloaded configs"; @SuppressWarnings("unused") private static void load() { RELOADED = config.getString(prefix, "reloaded", RELOADED); } } public static class ROTATE_BLOCK { private static final String prefix = "pu-command.rotate-block."; public static String ENABLED = "You enabled rotating blocks by left clicking them with a wooden hoe"; public static String DISABLED = "You disabled rotating blocks"; @SuppressWarnings("unused") private static void load() { ENABLED = config.getString(prefix, "enabled", ENABLED); DISABLED = config.getString(prefix, "disabled", DISABLED); } } public static class KEY { private static final String prefix = "pu-command.key."; public static String CRATE_NOT_EXIST = "There is no crate called "; public static String RETRIEVED_ALL_KEYS = "You already retrieved all keys for the ."; public static String GAVE_KEY = "You received a key. You have received out of keys. Make sure to use your key before requesting another"; public static String GAVE_FINAL_KEY = "You received your final key. You have received a total of keys for this crate."; @SuppressWarnings("unused") private static void load() { CRATE_NOT_EXIST = config.getString(prefix, "crate-not-exist", CRATE_NOT_EXIST); RETRIEVED_ALL_KEYS = config.getString(prefix, "retrieved-all-keys", RETRIEVED_ALL_KEYS); GAVE_KEY = config.getString(prefix, "gave-key", GAVE_KEY); GAVE_FINAL_KEY = config.getString(prefix, "gave-final-key", GAVE_FINAL_KEY); } } public static class BLOCK_BLOCK_USE { private static final String prefix = "block-block-use."; public static String BLOCKED = "You are not powerful enough!"; @SuppressWarnings("unused") private static void load() { BLOCKED = config.getString(prefix, "blocked", BLOCKED); } } }