mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-02 22:16:22 +00:00
Move language stuff to its own file
This commit is contained in:
1 parent
69375bbd33
commit
7124585602
17 files changed
+93
-73
No files matched your search
@@ -23,7 +23,7 @@ public class AdventureManager {
|
||||
}
|
||||
|
||||
public Component processMessage(String input, String... placeholders) {
|
||||
switch (carbonChat.getConfig().getString("formatting.type", "minimessage").toLowerCase()) {
|
||||
switch (carbonChat.getLanguage().getString("formatting.type", "minimessage").toLowerCase()) {
|
||||
case "minedown":
|
||||
return processMineDown(input, placeholders);
|
||||
case "minimessage-markdown":
|
||||
|
||||
@@ -61,7 +61,7 @@ public class CommandManager {
|
||||
|
||||
commandManager.getCommandConditions().addCondition(ChatChannel.class,"canuse", (context, execution, value) -> {
|
||||
if (value == null) {
|
||||
throw new ConditionFailedException(carbonChat.getConfig().getString("language.cannot-use-channel"));
|
||||
throw new ConditionFailedException(carbonChat.getLanguage().getString("cannot-use-channel"));
|
||||
}
|
||||
|
||||
ChatUser user = carbonChat.getUserService().wrap(context.getIssuer().getPlayer());
|
||||
@@ -73,7 +73,7 @@ public class CommandManager {
|
||||
|
||||
commandManager.getCommandConditions().addCondition(ChatChannel.class,"exists", (context, execution, value) -> {
|
||||
if (value == null) {
|
||||
throw new ConditionFailedException(carbonChat.getConfig().getString("language.cannot-use-channel"));
|
||||
throw new ConditionFailedException(carbonChat.getLanguage().getString("cannot-use-channel"));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user