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

218 lines
12 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>";
public static String START_ROUND = "<green>Start the game: <gold>/hg start</gold></green>";
public static String NEXT_PHASE = "<green>Skip to the next phase/stage: <gold>/hg nextphase</gold></green>";
public static String RELOAD = "<green>Reload config and messages: <gold>/hg reload</gold></green>";
public static String STUCK = "<green>Teleport to safety if stuck: <gold>/hg stuck</gold></green>";
public static String STATS = "<green>Show player stats: <gold>/hg stats [player]</gold></green>";
public static String END_ROUND = "<green>End the game: <gold>/hg end</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);
START_ROUND = config.getString(prefix, "start", START_ROUND);
NEXT_PHASE = config.getString(prefix, "next-phase", NEXT_PHASE);
RELOAD = config.getString(prefix, "reload", RELOAD);
STUCK = config.getString(prefix, "stuck", STUCK);
STATS = config.getString(prefix, "stats", STATS);
END_ROUND = config.getString(prefix, "end-round", END_ROUND);
}
}
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>";
public static String RELOAD_SUCCESS = "<green>Config and messages have been reloaded.</green>";
public static String COMMAND_BLOCKED = "<red>You cannot use that command here!</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);
RELOAD_SUCCESS = config.getString(prefix, "reload-success", RELOAD_SUCCESS);
COMMAND_BLOCKED = config.getString(prefix, "command-blocked", COMMAND_BLOCKED);
}
}
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 GAME {
private static final String prefix = "game.";
public static String WARMUP = "<gold>The Hunger Games are starting soon! Get ready!</gold>";
public static String STARTED = "<green><bold>The Hunger Games has begun! Good luck!</bold></green>";
public static String BORDER_SHRINK = "<red>The border is shrinking to <size> blocks!</red>";
public static String CHEST_EMPTY = "<red>This chest is empty!</red>";
public static String WINNER = "<gold><player> has won the Hunger Games!</gold>";
public static String PLAYER_DEATH = "<red><player> has died! <gold><remaining></gold> players remaining.</red>";
public static String BOSSBAR_COUNTDOWN = "<gold>Loot phase in <time></gold>";
public static String BOSSBAR_PVP_COUNTDOWN = "<green>PVP starts in <time></green>";
public static String BOSSBAR_SAFE_PHASE = "<green>Border shrinking in <time></green>";
public static String BOSSBAR_KILL_PHASE = "<red>Border shrinking... <time></red>";
public static String BOSSBAR_FINALE = "<gold>Remaining Players: <remaining></gold>";
public static String NEXT_STATE = "<gold>Starting <round>!</gold>";
@SuppressWarnings("unused")
private static void load() {
WARMUP = config.getString(prefix, "warmup", WARMUP);
STARTED = config.getString(prefix, "started", STARTED);
BORDER_SHRINK = config.getString(prefix, "border-shrink", BORDER_SHRINK);
CHEST_EMPTY = config.getString(prefix, "chest-empty", CHEST_EMPTY);
WINNER = config.getString(prefix, "winner", WINNER);
PLAYER_DEATH = config.getString(prefix, "player-death", PLAYER_DEATH);
BOSSBAR_COUNTDOWN = config.getString(prefix, "bossbar-countdown", BOSSBAR_COUNTDOWN);
BOSSBAR_PVP_COUNTDOWN = config.getString(prefix, "bossbar-pvp-countdown", BOSSBAR_PVP_COUNTDOWN);
BOSSBAR_SAFE_PHASE = config.getString(prefix, "bossbar-border-shrinking-in", BOSSBAR_SAFE_PHASE);
BOSSBAR_KILL_PHASE = config.getString(prefix, "bossbar-border-shrinking", BOSSBAR_KILL_PHASE);
BOSSBAR_FINALE = config.getString(prefix, "bossbar-finale", BOSSBAR_FINALE);
NEXT_STATE = config.getString(prefix, "next-state", NEXT_STATE);
}
}
public static class START_ROUND {
private static final String prefix = "start-round.";
public static String CAN_NOT_START_ROUND = "<red>Unable to start the round, current state is <round_state></red>";
@SuppressWarnings("unused")
private static void load() {
CAN_NOT_START_ROUND = config.getString(prefix, "can-not-start", CAN_NOT_START_ROUND);
}
}
public static class RECONNECT {
private static final String prefix = "reconnect.";
public static String FORFEITED = "<red>You disconnected during the round and have forfeited the game. You are now spectating.</red>";
@SuppressWarnings("unused")
private static void load() {
FORFEITED = config.getString(prefix, "forfeited", FORFEITED);
}
}
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>";
public static String PLAYER_REGISTERED = "<green>Registered <player> for the game</green>";
public static String PLAYER_SPECTATING = "<yellow><player> is now spectating the game</yellow>";
public static String SUCCESSFUL_REGISTER = "<green>Successfully registered you for the upcoming Hunger Games round</green>";
public static String GAME_RUNNING = "<yellow>The game is currently running, you will need to spectate the current round</yellow>";
@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);
PLAYER_REGISTERED = config.getString(prefix, "player-registered", PLAYER_REGISTERED);
PLAYER_SPECTATING = config.getString(prefix, "player-spectating", PLAYER_SPECTATING);
SUCCESSFUL_REGISTER = config.getString(prefix, "successful", SUCCESSFUL_REGISTER);
GAME_RUNNING = config.getString(prefix, "game-running", GAME_RUNNING);
}
}
public static class STUCK {
private static final String prefix = "stuck.";
public static String TELEPORTED = "<green>You have been teleported to safety!</green>";
public static String TOO_LOW = "<red>You are too low to use this command (minimum height: <height>). If you are truly stuck here dm a staff member for help</red>";
public static String NO_SAFE_LOCATION = "<red>Unable to find a safe grass block nearby</red>";
public static String ON_COOLDOWN = "<red>You must wait <time> before using this command again</red>";
public static String WARMUP_STARTED = "<green>Teleporting in <time>. Do not move or take damage!</green>";
public static String WARMUP_CANCELLED_MOVEMENT = "<red>Teleportation cancelled due to movement.</red>";
public static String WARMUP_CANCELLED_DAMAGE = "<red>Teleportation cancelled due to taking damage.</red>";
public static String ALREADY_WARMING_UP = "<red>You are already warming up!</red>";
@SuppressWarnings("unused")
private static void load() {
TELEPORTED = config.getString(prefix, "teleported", TELEPORTED);
TOO_LOW = config.getString(prefix, "too-low", TOO_LOW);
NO_SAFE_LOCATION = config.getString(prefix, "no-safe-location", NO_SAFE_LOCATION);
ON_COOLDOWN = config.getString(prefix, "on-cooldown", ON_COOLDOWN);
WARMUP_STARTED = config.getString(prefix, "warmup-started", WARMUP_STARTED);
WARMUP_CANCELLED_MOVEMENT = config.getString(prefix, "warmup-cancelled-movement", WARMUP_CANCELLED_MOVEMENT);
WARMUP_CANCELLED_DAMAGE = config.getString(prefix, "warmup-cancelled-damage", WARMUP_CANCELLED_DAMAGE);
ALREADY_WARMING_UP = config.getString(prefix, "already-warming-up", ALREADY_WARMING_UP);
}
}
public static class STATS {
private static final String prefix = "stats.";
public static String STATS_FORMAT = """
<gold>Stats for <player>:</gold>
<green>Kills: <gold><kills></gold></green>
<green>Deaths: <gold><deaths></gold></green>
<green>Damage Dealt: <gold><damage_dealt></gold></green>
<green>Damage Taken: <gold><damage_taken></gold></green>
<green>Wins: <gold><wins></gold></green>
<green>Rounds Played: <gold><rounds_played></gold></green>
<green>K/D Ratio: <gold><kd_ratio></gold></green>""";
@SuppressWarnings("unused")
private static void load() {
STATS_FORMAT = config.getString(prefix, "format", STATS_FORMAT);
}
}
public static class COMMANDS {
private static final String prefix = "commands.";
public static String NEXT_PHASE_SUCCESS = "<green>Skipping to the next phase/stage.</green>";
@SuppressWarnings("unused")
private static void load() {
NEXT_PHASE_SUCCESS = config.getString(prefix + "next-phase", "success", NEXT_PHASE_SUCCESS);
}
}
}