From e014d092937c933e9800167bba3d538dc1040ee9 Mon Sep 17 00:00:00 2001 From: jhqwqmc <2110242767@qq.com> Date: Sun, 30 Mar 2025 01:08:22 +0800 Subject: [PATCH] =?UTF-8?q?feat(core):=20=E4=BC=98=E5=8C=96=E6=80=A7?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../craftengine/core/plugin/locale/I18NData.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/net/momirealms/craftengine/core/plugin/locale/I18NData.java b/core/src/main/java/net/momirealms/craftengine/core/plugin/locale/I18NData.java index 31a66e917..178607283 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/plugin/locale/I18NData.java +++ b/core/src/main/java/net/momirealms/craftengine/core/plugin/locale/I18NData.java @@ -48,7 +48,18 @@ public class I18NData { int validKeyCount = 0; for (Map.Entry entry : data.entrySet()) { String key = entry.getKey(); - if (key != null && key.length() > 11 && key.startsWith("block_name:")) { + if (key != null && key.length() > 11 && + key.charAt(0) == 'b' && + key.charAt(1) == 'l' && + key.charAt(2) == 'o' && + key.charAt(3) == 'c' && + key.charAt(4) == 'k' && + key.charAt(5) == '_' && + key.charAt(6) == 'n' && + key.charAt(7) == 'a' && + key.charAt(8) == 'm' && + key.charAt(9) == 'e' && + key.charAt(10) == ':') { keyBuffer[validKeyCount++] = key; } }