2023-07-06 03:24:06 +00:00
package com.alttd.playerutils.config ;
import com.alttd.playerutils.util.Logger ;
2023-07-07 21:49:34 +00:00
import java.io.File ;
2023-07-06 03:24:06 +00:00
import java.util.List ;
public class Messages extends AbstractConfig {
static Messages config ;
private final Logger logger ;
2023-07-07 21:49:34 +00:00
Messages ( Logger logger ) {
super (
2024-08-04 20:26:46 +00:00
new File ( File . separator
+ " mnt " + File . separator
2023-07-07 21:49:34 +00:00
+ " configs " + File . separator
+ " PlayerUtils " ) ,
" messages.yml " , logger ) ;
2023-07-06 03:24:06 +00:00
this . logger = logger ;
}
2023-07-07 21:49:34 +00:00
public static void reload ( Logger logger ) {
config = new Messages ( logger ) ;
2023-07-06 03:24:06 +00:00
config . readConfig ( Messages . class , null ) ;
}
public static class HELP {
private static final String prefix = " help. " ;
public static String HELP_MESSAGE_WRAPPER = " <gold>PlayerUtils help: \ n<commands></gold> " ;
public static String HELP_MESSAGE = " <green>Show this menu: <gold>/pu help</gold></green> " ;
public static String GLOW = " <green>Glow in a specified color: <gold>/pu glow <color></gold></green> " ;
2023-10-02 19:42:47 +00:00
public static String XP_CHEQUE = " <green>Create an XP cheque: <gold>/pu xpcheque <xp_value> [amount]</gold></green> " ;
2023-07-08 22:24:47 +00:00
public static String XP_CALC = " <green>Calculate the amount of XP between levels: <gold>/pu xpcalc <from> <to></gold></green> " ;
2023-07-07 21:49:34 +00:00
public static String RELOAD = " <green>Reload the configs for PlayerUtils: <gold>/pu reload</gold></green> " ;
2023-07-08 04:26:01 +00:00
public static String ROTATE_BLOCK = " <green>Enable rotating blocks with a blaze rod: <gold>/pu rotateblock</gold></green> " ;
2024-10-04 18:53:54 +00:00
public static String KEY = " <green>Receive a key that you are owed: <gold>/pu key</gold></green> " ;
2023-07-06 03:24:06 +00:00
@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 ) ;
GLOW = config . getString ( prefix , " glow " , GLOW ) ;
XP_CHEQUE = config . getString ( prefix , " xp-cheque " , XP_CHEQUE ) ;
2023-07-07 21:42:08 +00:00
XP_CALC = config . getString ( prefix , " xp-calc " , XP_CALC ) ;
2023-07-07 21:49:34 +00:00
RELOAD = config . getString ( prefix , " reload " , RELOAD ) ;
2023-07-08 04:26:01 +00:00
ROTATE_BLOCK = config . getString ( prefix , " rotate-block " , ROTATE_BLOCK ) ;
2023-07-06 03:24:06 +00:00
}
}
public static class GENERIC {
private static final String prefix = " generic. " ;
2023-08-13 20:58:53 +00:00
public static String NO_PERMISSION = " <red><hover:show_text:'<red><permission></red>'>You don't have permission for this command</hover></red> " ;
2023-07-06 03:24:06 +00:00
public static String PLAYER_ONLY = " <red>This command can only be executed as a player</red> " ;
2023-08-13 20:58:53 +00:00
public static String PLAYER_NOT_FOUND = " <red>Unable to find online player <player></red> " ;
2023-07-06 03:24:06 +00:00
@SuppressWarnings ( " unused " )
private static void load ( ) {
NO_PERMISSION = config . getString ( prefix , " no-permission " , NO_PERMISSION ) ;
PLAYER_ONLY = config . getString ( prefix , " player-only " , PLAYER_ONLY ) ;
2023-08-13 20:58:53 +00:00
PLAYER_NOT_FOUND = config . getString ( prefix , " player-only " , PLAYER_NOT_FOUND ) ;
2023-07-06 03:24:06 +00:00
}
}
public static class GLOW {
private static final String prefix = " pu-command.glow " ;
public static String GLOW_OFF = " <green>Glow turned off</green> " ;
public static String GLOW_ON = " <green>Glow turned on, you are now glowing <color></green> " ;
2023-07-06 23:09:56 +00:00
public static String UNABLE_TO_GET_SCOREBOARD = " <red>Unable to get scoreboard for team</red> " ;
2023-08-13 20:58:53 +00:00
public static String GLOW_OFF_FOR_PLAYER = " <green>Glow turned off for <player></green> " ;
public static String GLOW_ON_FOR_PLAYER = " <green>Glow turned on for <player> they are now glowing <color></green> " ;
2023-07-06 03:24:06 +00:00
@SuppressWarnings ( " unused " )
private static void load ( ) {
GLOW_OFF = config . getString ( prefix , " glow-off " , GLOW_OFF ) ;
GLOW_ON = config . getString ( prefix , " glow-on " , GLOW_ON ) ;
2023-07-06 23:09:56 +00:00
UNABLE_TO_GET_SCOREBOARD = config . getString ( prefix , " unable-to-get-scoreboard " , UNABLE_TO_GET_SCOREBOARD ) ;
2023-07-06 03:24:06 +00:00
}
}
public static class XP_CHEQUE {
private static final String prefix = " pu-command.xp-cheque. " ;
2023-07-08 22:24:47 +00:00
public static String FAILED_STORAGE = " <red>Unable to create custom item for XP cheque</red> " ;
public static String NEGATIVE = " <red>You cannot enter a negative value for XP.</red> " ;
public static String NOT_ENOUGH_XP = " <red>Not enough XP, you have <xp></red> " ;
2023-07-06 03:24:06 +00:00
public static String NOT_HOLDING_BOTTLE = " <red>You need to hold an empty glass bottle while executing this command</red> " ;
2023-07-08 22:24:47 +00:00
public static String DISPLAY_NAME = " <yellow>XP bottle containing <xp> XP</yellow> " ;
public static List < String > LORE = List . of ( " Issued by <name> " , " Throw to retrieve <xp> XP " ) ;
2023-10-02 19:42:47 +00:00
public static String NOT_ENOUGH_BOTTLE = " <red>You need to be holding <amount> glass bottles</red> " ;
public static String INVALID_AMOUNT = " <red>You can only create between 1 and 64 xp cheque's at a time</red> " ;
2023-07-06 03:24:06 +00:00
@SuppressWarnings ( " unused " )
private static void load ( ) {
FAILED_STORAGE = config . getString ( prefix , " failed-storage " , FAILED_STORAGE ) ;
2023-07-06 21:14:07 +00:00
NEGATIVE = config . getString ( prefix , " negative " , NEGATIVE ) ;
2023-07-06 03:24:06 +00:00
NOT_ENOUGH_XP = config . getString ( prefix , " not-enough-xp " , NOT_ENOUGH_XP ) ;
NOT_HOLDING_BOTTLE = config . getString ( prefix , " not-holding-bottle " , NOT_HOLDING_BOTTLE ) ;
DISPLAY_NAME = config . getString ( prefix , " display-name " , DISPLAY_NAME ) ;
LORE = config . getStringList ( prefix , " lore " , LORE ) ;
2023-10-02 19:42:47 +00:00
NOT_ENOUGH_BOTTLE = config . getString ( prefix , " not-enough-bottle " , NOT_ENOUGH_BOTTLE ) ;
INVALID_AMOUNT = config . getString ( prefix , " invalid-amount " , INVALID_AMOUNT ) ;
2023-07-06 03:24:06 +00:00
}
}
2023-07-07 21:42:08 +00:00
public static class XP_CALC {
private static final String prefix = " pu-command.xp-cheque. " ;
public static String XP_NEEDED = " <green>Xp needed <gold><xp_needed></gold>.</green> " ;
@SuppressWarnings ( " unused " )
private static void load ( ) {
XP_NEEDED = config . getString ( prefix , " xp-needed " , XP_NEEDED ) ;
}
}
2023-07-07 21:49:34 +00:00
public static class RELOAD {
private static final String prefix = " pu-command.reload. " ;
public static String RELOADED = " <green>Reloaded configs</green> " ;
@SuppressWarnings ( " unused " )
private static void load ( ) {
RELOADED = config . getString ( prefix , " reloaded " , RELOADED ) ;
}
}
2023-07-08 04:26:01 +00:00
public static class ROTATE_BLOCK {
private static final String prefix = " pu-command.rotate-block. " ;
public static String ENABLED = " <green>You enabled rotating blocks by left clicking them with a <gold>wooden hoe</gold></green> " ;
public static String DISABLED = " <green>You <red>disabled</red> rotating blocks</green> " ;
@SuppressWarnings ( " unused " )
private static void load ( ) {
ENABLED = config . getString ( prefix , " enabled " , ENABLED ) ;
DISABLED = config . getString ( prefix , " disabled " , DISABLED ) ;
}
}
2024-10-04 18:53:54 +00:00
public static class KEY {
private static final String prefix = " pu-command.key. " ;
public static String CRATE_NOT_EXIST = " <red>There is no crate called <crate></green> " ;
public static String RETRIEVED_ALL_KEYS = " <red>You already retrieved all <keys> keys for the <crate>.</red> " ;
public static String GAVE_KEY = " <green>You received a <crate> key. You have received <keys> out of <total_keys> keys. Make sure to use your key before requesting another</green> " ;
public static String GAVE_FINAL_KEY = " <green>You received your final <crate> key. You have received a total of <keys> keys for this crate.</green> " ;
@SuppressWarnings ( " unused " )
private static void load ( ) {
CRATE_NOT_EXIST = config . getString ( prefix , " crate-not-exist " , CRATE_NOT_EXIST ) ;
RETRIEVED_ALL_KEYS = config . getString ( prefix , " retrieved-all-keys " , RETRIEVED_ALL_KEYS ) ;
GAVE_KEY = config . getString ( prefix , " gave-key " , GAVE_KEY ) ;
GAVE_FINAL_KEY = config . getString ( prefix , " gave-final-key " , GAVE_FINAL_KEY ) ;
}
}
2025-07-15 19:25:02 +00:00
public static class BLOCK_BLOCK_USE {
private static final String prefix = " block-block-use. " ;
public static String BLOCKED = " <red>You are not powerful enough!</red> " ;
@SuppressWarnings ( " unused " )
private static void load ( ) {
BLOCKED = config . getString ( prefix , " blocked " , BLOCKED ) ;
}
}
2023-07-06 03:24:06 +00:00
}