package com.alttd.custommobs.config; import lombok.extern.slf4j.Slf4j; import java.io.File; @Slf4j public class Messages extends AbstractConfig { static Messages config; Messages() { super( new File(File.separator + "mnt" + File.separator + "configs" + File.separator + "custommobs"), "messages.yml"); } public static void reload() { config = new Messages(); config.readConfig(Messages.class, null); log.info("Reloading messages"); } public static class HELP { private static final String prefix = "help."; public static String HELP_MESSAGE_WRAPPER = "Main help:\n"; public static String HELP_MESSAGE = "Show this menu: /cm help"; public static String SPAWN = "Spawn a mob of a specific type: /cm spawn [ ]"; @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); SPAWN = config.getString(prefix, "spawn", SPAWN); } } 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); } } }