CustomMobs/src/main/java/com/alttd/custommobs/config/Messages.java
2024-10-18 17:49:49 +02:00

56 lines
2.1 KiB
Java

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 = "<gold>Main help:\n<commands></gold>";
public static String HELP_MESSAGE = "<green>Show this menu: <gold>/cm help</gold></green>";
public static String SPAWN = "<green>Spawn a mob of a specific type: <gold>/cm spawn <mob_type> [<world> <x> <y> <z>]</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);
SPAWN = config.getString(prefix, "spawn", SPAWN);
}
}
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);
}
}
}