80 lines
3.2 KiB
Java
80 lines
3.2 KiB
Java
package com.alttd.hunger_games.config;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
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>";
|
|
public static String ROUND_STATE = "<green>Show the current round state: <gold>/hg roundstate</gold></green>";
|
|
public static String REGISTER = "<green>Register a player for the game: <gold>/hg register <player></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);
|
|
ROUND_STATE = config.getString(prefix, "round-state", ROUND_STATE);
|
|
REGISTER = config.getString(prefix, "register", REGISTER);
|
|
}
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
|
|
public static class ROUND_STATE {
|
|
private static final String prefix = "round-state.";
|
|
|
|
public static String ROUND_STATE = "<green>Current round state is: <gold>round_state</gold></green>";
|
|
|
|
@SuppressWarnings("unused")
|
|
private static void load() {
|
|
ROUND_STATE = config.getString(prefix, "round-state", ROUND_STATE);
|
|
}
|
|
}
|
|
|
|
public static class REGISTER {
|
|
private static final String prefix = "register.";
|
|
|
|
public static String FAILED_TO_REGISTER_YOU = "<red>You were unable to join HungerGames because no HungerGames round was found</red>";
|
|
public static String FAILED_TO_REGISTER_PLAYER = "<red>Unable to register player <player></red>";
|
|
|
|
@SuppressWarnings("unused")
|
|
private static void load() {
|
|
FAILED_TO_REGISTER_YOU = config.getString(prefix, "failed", FAILED_TO_REGISTER_YOU);
|
|
FAILED_TO_REGISTER_PLAYER = config.getString(prefix, "failed-player", FAILED_TO_REGISTER_PLAYER);
|
|
}
|
|
}
|
|
}
|