1
0
This commit is contained in:
Lee
2024-04-05 17:04:19 +01:00
parent 5e766a8eae
commit d7d2bb76ac
21 changed files with 295 additions and 73 deletions

View File

@ -24,6 +24,7 @@ public enum Lang {
VOTE_COMMAND_HEADER("vote-command.header"),
VOTE_COMMAND_FORMAT("vote-command.format"),
VOTE_COMMAND_LINKS("vote-command.links"),
VOTE_STATS_COMMAND("vote-stats-command"),
SAVE_ACCOUNTS_COMMAND_SAVING("save-accounts-command.saving"),
SAVE_ACCOUNTS_COMMAND_SAVED("save-accounts-command.saved"),
BLOCKED_MESSAGE("blocked-message"),
@ -35,7 +36,11 @@ public enum Lang {
COMMAND_SPY_ENABLED("command-spy.toggled-on"),
COMMAND_SPY_DISABLED("command-spy.toggled-off"),
COMMAND_SPY_FORMAT("command-spy.format"),
RENDER_DISTANCE_MESSAGE("render-distance-message");
RENDER_DISTANCE_MESSAGE("render-distance-message"),
VOTE_VOTED("vote.voted"),
VOTE_BROADCAST("vote.broadcast"),
STAFF_CHAT_FORMAT("staff-chat.format"),
STAFF_CHAT_USAGE("staff-chat.usage");
/**
* The path of the lang in the lang.yml file.
@ -49,7 +54,7 @@ public enum Lang {
/**
* Cache of the lang values.
*/
private final HashMap<String, Object> cache = new HashMap<>();
private static final HashMap<String, Object> cache = new HashMap<>();
/**
* The lang configuration.
@ -88,4 +93,11 @@ public enum Lang {
public List<String> getAsStringList() {
return (List<String>) get();
}
/**
* Clear the cache.
*/
public static void clear() {
cache.clear();
}
}