From c84117ef8a9212a116f9ea063e2fdc85c35269d1 Mon Sep 17 00:00:00 2001 From: jhqwqmc <2110242767@qq.com> Date: Wed, 19 Mar 2025 23:45:16 +0800 Subject: [PATCH] =?UTF-8?q?feat(core):=20=E4=BC=98=E5=8C=96=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bukkit-loader/src/main/resources/config.yml | 1 + .../craftengine/core/plugin/config/ConfigManager.java | 6 ++++++ gradle.properties | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bukkit-loader/src/main/resources/config.yml b/bukkit-loader/src/main/resources/config.yml index 7c3c61845..fb908e038 100644 --- a/bukkit-loader/src/main/resources/config.yml +++ b/bukkit-loader/src/main/resources/config.yml @@ -28,6 +28,7 @@ resource-pack: seed: 0 # 0 = random seed fake-directory: true escape-unicode: true + break-json: true resource-location: enable: true random-namespace: diff --git a/core/src/main/java/net/momirealms/craftengine/core/plugin/config/ConfigManager.java b/core/src/main/java/net/momirealms/craftengine/core/plugin/config/ConfigManager.java index 9490ece90..2e449ac12 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/plugin/config/ConfigManager.java +++ b/core/src/main/java/net/momirealms/craftengine/core/plugin/config/ConfigManager.java @@ -54,6 +54,7 @@ public class ConfigManager implements Reloadable { protected long resource_pack$protection$obfuscation$seed; protected boolean resource_pack$protection$obfuscation$fake_directory; protected boolean resource_pack$protection$obfuscation$escape_unicode; + protected boolean resource_pack$protection$obfuscation$break_json; protected boolean resource_pack$protection$obfuscation$resource_location$enable; protected int resource_pack$protection$obfuscation$resource_location$random_namespace$length; protected int resource_pack$protection$obfuscation$resource_location$random_namespace$amount; @@ -200,6 +201,7 @@ public class ConfigManager implements Reloadable { resource_pack$protection$obfuscation$seed = config.getLong("resource-pack.protection.obfuscation.seed", 0L); resource_pack$protection$obfuscation$fake_directory = config.getBoolean("resource-pack.protection.obfuscation.fake-directory", false); resource_pack$protection$obfuscation$escape_unicode = config.getBoolean("resource-pack.protection.obfuscation.escape-unicode", false); + resource_pack$protection$obfuscation$break_json = config.getBoolean("resource-pack.protection.obfuscation.break-json", false); resource_pack$protection$obfuscation$resource_location$enable = config.getBoolean("resource-pack.protection.obfuscation.resource-location.enable", false); resource_pack$protection$obfuscation$resource_location$random_namespace$amount = config.getInt("resource-pack.protection.obfuscation.resource-location.random-namespace.amount", 32); @@ -435,6 +437,10 @@ public class ConfigManager implements Reloadable { return instance.resource_pack$protection$obfuscation$escape_unicode; } + public static boolean breakJson() { + return instance.resource_pack$protection$obfuscation$break_json; + } + public static boolean enableRandomResourceLocation() { return instance.resource_pack$protection$obfuscation$resource_location$enable; } diff --git a/gradle.properties b/gradle.properties index 3bbacafe3..4366964ee 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ # Project settings # Rule: [major update].[feature update].[bug fix] -project_version=0.0.35 -config_version=14 +project_version=0.0.36 +config_version=15 lang_version=3 project_group=net.momirealms latest_minecraft_version=1.21.4