From aae3f57ad49de4f3b686f465b4a625c5a8615beb Mon Sep 17 00:00:00 2001 From: xz Date: Sat, 22 Aug 2026 17:26:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E8=8B=B1=E6=96=87=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E6=97=A5=E5=BF=97=20and=20=E5=88=A0=E9=99=A4=E8=AF=AD?= =?UTF-8?q?=E8=A8=80=E6=96=87=E4=BB=B6(=E4=B8=93=E7=94=A8=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E7=AB=AF=E6=B2=A1=E6=9C=89I18n=E7=B1=BB)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ataku/stopcheat/CommandInterceptor.java | 10 +++++----- src/main/resources/assets/stopcheat/lang/en_us.json | 13 ------------- 2 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 src/main/resources/assets/stopcheat/lang/en_us.json diff --git a/src/main/java/com/ataku/stopcheat/CommandInterceptor.java b/src/main/java/com/ataku/stopcheat/CommandInterceptor.java index fbaecd5..c6ffcaa 100644 --- a/src/main/java/com/ataku/stopcheat/CommandInterceptor.java +++ b/src/main/java/com/ataku/stopcheat/CommandInterceptor.java @@ -32,7 +32,7 @@ public class CommandInterceptor { for (String command: commands) { List black = new ArrayList<>(Arrays.asList(command.split(CMDSEPARATOR))); if (black.isEmpty()){ - LOGGER.warn("{} 配置不可用, 长度错误", command); + LOGGER.warn("{} configuration unavailable, length error", command); } else if (black.size() < 3){ for (int i = 0; black.size() + i < 3; i++){ black.add("0"); @@ -41,7 +41,7 @@ public class CommandInterceptor { } else if (black.size() == 3){ blackList.add(black); } else { - LOGGER.warn("{} 配置不可用, 长度错误", command); + LOGGER.warn("{} configuration unavailable, length error", command); } } return blackList; @@ -77,19 +77,19 @@ public class CommandInterceptor { try { stopIndex = Integer.parseInt(blackCommands.get(arg_CHECKINDEX)); // 将blackCommands[args_STOPINDEX] 转换为为Integer }catch (NumberFormatException e){ - LOGGER.warn("{} 配置不可用, args_STOPINDEX错误,重置为0", String.join(CMDSEPARATOR, blackCommands)); + LOGGER.warn("{} configuration unavailable, args_STOPINDEX error, reset to 0", String.join(CMDSEPARATOR, blackCommands)); stopIndex = arg_blackLISTCOMMANDNAME; } if (stopIndex == 0){ // 禁止整个指令而不是特定参数的指令 event.setCanceled(true); - LOGGER.info("{} 使用 {} 命令被拦截", source.getTextName(), raw); + LOGGER.info("{} used {} command and was intercepted", source.getTextName(), raw); broadcast(source); } else { List blackArgs = Arrays.asList(blackCommands.get(arg_PARAMETERS).split(",")); if (blackArgs.contains(parts[stopIndex])){ // 禁止特定参数的指令,在配置中定义 event.setCanceled(true); - LOGGER.info("{} 使用 {} 命令被拦截", source.getTextName(), raw); + LOGGER.info("{} used {} command and was intercepted", source.getTextName(), raw); broadcast(source); } } diff --git a/src/main/resources/assets/stopcheat/lang/en_us.json b/src/main/resources/assets/stopcheat/lang/en_us.json deleted file mode 100644 index 71c83ec..0000000 --- a/src/main/resources/assets/stopcheat/lang/en_us.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "itemGroup.stopcheat": "Example Mod Tab", - "block.stopcheat.example_block": "Example Block", - "item.stopcheat.example_item": "Example Item", - - "stopcheat.configuration.title": "stopcheat Configs", - "stopcheat.configuration.section.stopcheat.common.toml": "stopcheat Configs", - "stopcheat.configuration.section.stopcheat.common.toml.title": "stopcheat Configs", - "stopcheat.configuration.items": "Item List", - "stopcheat.configuration.logDirtBlock": "Log Dirt Block", - "stopcheat.configuration.magicNumberIntroduction": "Magic Number Text", - "stopcheat.configuration.magicNumber": "Magic Number" -}