Rename serversideShortName to chatCommandName

This commit is contained in:
s809
2025-01-02 19:43:01 +05:00
parent f4126f5378
commit dccdbaeb73
@@ -51,24 +51,24 @@ public class ConfigCommand extends AbstractCommand
//noinspection PatternVariableCanBeUsed //noinspection PatternVariableCanBeUsed
ConfigEntry configEntry = (ConfigEntry) type; ConfigEntry configEntry = (ConfigEntry) type;
if (configEntry.getServersideShortName() == null) if (configEntry.getChatCommandName() == null)
{ {
continue; continue;
} }
LiteralArgumentBuilder<CommandSourceStack> subcommand = literal(configEntry.getServersideShortName()) LiteralArgumentBuilder<CommandSourceStack> subcommand = literal(configEntry.getChatCommandName())
.executes(commandContext -> this.sendSuccessResponse(commandContext, .executes(commandContext -> this.sendSuccessResponse(commandContext,
"\n" + "\n" +
"Description of §l" + configEntry.getServersideShortName() + "§r:\n" + "Description of §l" + configEntry.getChatCommandName() + "§r:\n" +
"§o" + configEntry.getComment().trim() + "§r\n" + "§o" + configEntry.getComment().trim() + "§r\n" +
"§7Config file name: §f" + configEntry.name + "§7, category: §f" + configEntry.category + "\n" + "§7Config file name: §f" + configEntry.name + "§7, category: §f" + configEntry.category + "\n" +
"\n" + "\n" +
"Current value of " + configEntry.getServersideShortName() + " is §n" + configEntry.get() + "§r" "Current value of " + configEntry.getChatCommandName() + " is §n" + configEntry.get() + "§r"
)); ));
ToIntBiFunction<CommandContext<CommandSourceStack>, Object> updateConfigValue = (commandContext, value) -> { ToIntBiFunction<CommandContext<CommandSourceStack>, Object> updateConfigValue = (commandContext, value) -> {
configEntry.set(value); configEntry.set(value);
return this.sendSuccessResponse(commandContext, "Changed the value of ["+configEntry.getServersideShortName()+"] to ["+value+"]"); return this.sendSuccessResponse(commandContext, "Changed the value of ["+configEntry.getChatCommandName()+"] to ["+value+"]");
}; };
// Enum type needs a special case since enums aren't represented by existing argument type // Enum type needs a special case since enums aren't represented by existing argument type