You've already forked Arcturus-Morningstar-Extended
mirror of
https://github.com/duckietm/Arcturus-Morningstar-Extended.git
synced 2026-06-20 15:36:17 +00:00
Merge pull request #183 from simoleo89/fix/command-description-texts
fix(commands): complete and quiet command descriptions
This commit is contained in:
@@ -52,6 +52,10 @@ public class TextsManager {
|
||||
return this.texts.getProperty(key, defaultValue);
|
||||
}
|
||||
|
||||
public String getValueQuietly(String key, String defaultValue) {
|
||||
return this.texts.getProperty(key, defaultValue);
|
||||
}
|
||||
|
||||
public boolean getBoolean(String key) {
|
||||
return this.getBoolean(key, false);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ public class CommandsCommand extends Command {
|
||||
|
||||
for (Command c : commands) {
|
||||
String textKey = "commands.description." + c.permission;
|
||||
String commandText = Emulator.getTexts().getValue(textKey, "");
|
||||
String commandText = Emulator.getTexts().getValueQuietly(textKey, "");
|
||||
String commandLine = ":" + c.keys[0];
|
||||
String description = "";
|
||||
|
||||
|
||||
+2
-2
@@ -23,10 +23,10 @@ public class AvailableCommandsComposer extends MessageComposer {
|
||||
for (Command cmd : this.commands) {
|
||||
this.response.appendString(cmd.keys[0]);
|
||||
this.response.appendString(
|
||||
Emulator.getTexts().getValue("commands.description." + cmd.permission, cmd.permission)
|
||||
Emulator.getTexts().getValueQuietly("commands.description." + cmd.permission, cmd.permission)
|
||||
);
|
||||
}
|
||||
|
||||
return this.response;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user