diff --git a/src/main/java/com/alttd/playerutils/config/Messages.java b/src/main/java/com/alttd/playerutils/config/Messages.java deleted file mode 100644 index c4ae211..0000000 --- a/src/main/java/com/alttd/playerutils/config/Messages.java +++ /dev/null @@ -1,200 +0,0 @@ -package com.alttd.playerutils.config; - -import org.jetbrains.annotations.NotNull; - -import java.io.File; -import java.util.List; - -public class Messages extends AbstractConfig { - static Messages config; - - Messages() { - super( - new File(File.separator - + "mnt" + File.separator - + "configs" + File.separator - + "PlayerUtils"), - "messages.yml"); - } - - public static void reload() { - config = new Messages(); - 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"; - public static String GHAST_SPEED = "Set the speed of a ghast: /pu ghastspeed "; - public static String RECOUNT_ARMOR_STANDS = "Recount armor stands in current chunk: /pu recount"; - - @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); - GHAST_SPEED = config.getString(prefix, "ghast-speed", GHAST_SPEED); - RECOUNT_ARMOR_STANDS = config.getString(prefix, "recount-armor-stands", RECOUNT_ARMOR_STANDS); - } - } - - 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 GHAST_SPEED { - private static final String prefix = "pu-command.ghast-speed."; - - public static String NOT_RIDING_A_GHAST = "You are not riding a ghast"; - public static String FAILED_TO_SET_SPEED = "Failed to set ghast speed"; - public static String NEW_SPEED_SET_TO = "New speed set to "; - - @SuppressWarnings("unused") - private static void load() { - NOT_RIDING_A_GHAST = config.getString(prefix, "not-riding-a-ghast", NOT_RIDING_A_GHAST); - FAILED_TO_SET_SPEED = config.getString(prefix, "failed-to-set-speed", FAILED_TO_SET_SPEED); - NEW_SPEED_SET_TO = config.getString(prefix, "new-speed-set-to", NEW_SPEED_SET_TO); - } - } - - 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); - } - - } - - public static class RECOUNT_ARMOR_STANDS { - private static final String prefix = "recount-armor-stands."; - - public static String FAILED_COUNT = "Unable to recount armor stands."; - public static String SUCCESS = "Recounted armor stands and the count to chunk data."; - - @SuppressWarnings("unused") - private static void load() { - FAILED_COUNT = config.getString(prefix, "failed-count", FAILED_COUNT); - SUCCESS = config.getString(prefix, "success", SUCCESS); - } - } -}