This commit is contained in:
Xujiayao 2025-11-18 01:16:32 +08:00
parent 6e86844aba
commit 2fe657db30
4 changed files with 21 additions and 5 deletions

View file

@ -32,7 +32,7 @@ public class CommandEventHandler {
}));
EventManager.register(CommandEvents.StopEvent.class, event -> commandExecutor.submit(() -> {
LOGGER.info(I18nManager.getDmccTranslation("commands.stop.stopping"));
LOGGER.info(I18nManager.getDmccTranslation("commands.shutdown.shutting_down"));
new Thread(() -> {
if (IS_MINECRAFT_ENV) {

View file

@ -32,12 +32,12 @@ public class CommandManager {
switch (command) {
case "help" -> {
response.add("==================== " + I18nManager.getDmccTranslation("commands.help.help") + " ====================");
response.add("- help | " + I18nManager.getDmccTranslation("commands.help.description"));
response.add("- reload | " + I18nManager.getDmccTranslation("commands.reload.description"));
response.add("- stop | " + I18nManager.getDmccTranslation("commands.stop.description"));
response.add("- help | " + I18nManager.getDmccTranslation("commands.help.description"));
response.add("- reload | " + I18nManager.getDmccTranslation("commands.reload.description"));
response.add("- shutdown | " + I18nManager.getDmccTranslation("commands.shutdown.description"));
}
case "reload" -> EventManager.post(new CommandEvents.ReloadEvent());
case "stop" -> EventManager.post(new CommandEvents.StopEvent());
case "shutdown" -> EventManager.post(new CommandEvents.StopEvent());
default -> response.add(I18nManager.getDmccTranslation("commands.unknown_command", command));
}

View file

@ -8,6 +8,14 @@
# Language: English (US)
# ==================================================
handshake:
success: "Handshake with server successful. DMCC is now operational."
error:
not_whitelisted: "This server is not whitelisted on the standalone server."
invalid_version: "Incompatible DMCC version."
duplicate_name: "A client with the same server name is already connected."
authentication_failed: "Authentication failed. The shared_secret does not match."
commands:
unknown_command: "Unknown command: \"{}\". Type \"help\" for a list of available commands."
no_permission: "You do not have permission to execute this command!"

View file

@ -8,6 +8,14 @@
# Language: 简体中文(中国大陆)
# ==================================================
handshake:
success: "与服务端握手成功。DMCC 已成功连接并开始运行。"
error:
not_whitelisted: "此服务器未在独立服务端的白名单中。"
invalid_version: "DMCC 版本不兼容。"
duplicate_name: "一个使用相同服务器名称的客户端已经连接。"
authentication_failed: "身份验证失败。共享密钥 (shared_secret) 不匹配。"
commands:
unknown_command: "未知命令:\"{}\"。输入 \"help\" 查看可用命令列表。"
no_permission: "你没有权限执行此命令!"