HungerGames/src/main/java/com/alttd/hunger_games/config/Messages.java

50 lines
1.8 KiB
Java

package com.alttd.hunger_games.config;
import java.io.File;
public class Messages extends AbstractConfig {
static Messages config;
Messages() {
super(
new File(File.separator
+ "mnt" + File.separator
+ "configs" + File.separator
+ "HungerGames"),
"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 = "<gold>HungerGames help:\n<commands></gold>";
public static String HELP_MESSAGE = "<green>Show this menu: <gold>/hg help</gold></green>";
@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);
}
}
public static class GENERIC {
private static final String prefix = "generic.";
public static String NO_PERMISSION = "<red><hover:show_text:'<red><permission></red>'>You don't have permission for this command</hover></red>";
public static String PLAYER_ONLY = "<red>This command can only be executed as a player</red>";
public static String PLAYER_NOT_FOUND = "<red>Unable to find online player <player></red>";
@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);
}
}
}