Merge pull request #183 from simoleo89/fix/command-description-texts

fix(commands): complete and quiet command descriptions
This commit is contained in:
DuckieTM
2026-06-15 07:21:39 +02:00
committed by GitHub
10 changed files with 115 additions and 3 deletions
@@ -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 = "";
@@ -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;
}
}
}