This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDefaultMessages.java
39 lines (31 loc) · 2.01 KB
/
DefaultMessages.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.github.derrop.simplecommand.defaults;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
public class DefaultMessages {
private static final Map<String, String> MESSAGES = new HashMap<>();
public static final Function<String, String> FUNCTION = MESSAGES::get;
static {
registerMessage("help-command-not-found", "That command doesn't exist");
registerMessage("help-command-info", "Use \"help <command>\" to get further information to a command");
registerMessage("only-console", "This sub command is only available for the console!");
registerMessage("no-permission", "You are not allowed to use this sub command!");
registerMessage("argument-invalid-default", "Please provide a valid value!");
registerMessage("argument-show-answers", "You have to provide one of the following: %values%");
registerMessage("argument-invalid-url", "Please provide a valid URL!");
registerMessage("argument-int-not-positive", "Please provide a positive integer!");
registerMessage("argument-int-not-negative", "Please provide a negative integer!");
registerMessage("argument-string-too-long", "The string cannot be longer than %maxLength% characters!");
registerMessage("argument-invalid-uuid", "Please provide a valid UUID!");
registerMessage("argument-invalid-int", "Please provide a valid integer!");
registerMessage("argument-invalid-int-range", "Please provide a valid integer between %min% and %max%!");
registerMessage("argument-invalid-double", "Please provide a valid decimal number!");
registerMessage("argument-invalid-url", "Please provide a valid URL!");
registerMessage("argument-invalid-boolean", "Please type in \"%true%\" or \"%false%\"!");
registerMessage("argument-boolean-true", "yes");
registerMessage("argument-boolean-false", "no");
}
private static void registerMessage(String key, String value) {
MESSAGES.put(key, value);
}
}