9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-19 15:09:15 +00:00

修复模板boolean类型

This commit is contained in:
XiaoMoMi
2025-06-04 08:25:24 +08:00
parent b1fb6b1e8c
commit 8376f72352
9 changed files with 11 additions and 8 deletions

View File

@@ -6,14 +6,11 @@
</h1> </h1>
<p align="center"> <p align="center">
<a href="https://github.com/Xiao-MoMi/craft-engine/">
<img src="https://sloc.xyz/github/Xiao-MoMi/craft-engine/?category=code" alt="Scc Count Badge"/>
</a>
<a href="https://deepwiki.com/Xiao-MoMi/craft-engine"> <a href="https://deepwiki.com/Xiao-MoMi/craft-engine">
<img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"> <img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki">
</a> </a>
<a href="https://mo-mi.gitbook.io/xiaomomi-plugins/craftengine" alt="GitBook"> <a href="https://mo-mi.gitbook.io/xiaomomi-plugins/craftengine" alt="GitBook">
<img src="https://img.shields.io/badge/Docs-User Manual-D2691E" alt="Gitbook"/> <img src="https://img.shields.io/badge/📙-User Manual-D2691E" alt="Gitbook"/>
</a> </a>
</p> </p>

View File

@@ -106,6 +106,7 @@ public class BukkitCompatibilityManager implements CompatibilityManager {
} }
if (this.isPluginEnabled("AuraSkills")) { if (this.isPluginEnabled("AuraSkills")) {
this.registerLevelerProvider("AuraSkills", new AuraSkillsLevelerProvider()); this.registerLevelerProvider("AuraSkills", new AuraSkillsLevelerProvider());
logHook("AuraSkills");
} }
if (this.isPluginEnabled("MythicMobs")) { if (this.isPluginEnabled("MythicMobs")) {
BukkitItemManager.instance().registerExternalItemProvider(new MythicMobsProvider()); BukkitItemManager.instance().registerExternalItemProvider(new MythicMobsProvider());

View File

@@ -59,6 +59,8 @@ public class ImageExpansion extends PlaceholderExpansion {
int codepoint; int codepoint;
if (param.length == 4) { if (param.length == 4) {
codepoint = image.codepointAt(Integer.parseInt(param[2]), Integer.parseInt(param[3])); codepoint = image.codepointAt(Integer.parseInt(param[2]), Integer.parseInt(param[3]));
} else if (param.length == 3) {
codepoint = image.codepointAt(Integer.parseInt(param[2]), 0);
} else if (param.length == 2) { } else if (param.length == 2) {
codepoint = image.codepointAt(0,0); codepoint = image.codepointAt(0,0);
} else { } else {

View File

@@ -50,6 +50,7 @@ public class PaperCraftEngineBootstrap implements PluginBootstrap {
new ModernEventHandler(context, this.plugin).register(); new ModernEventHandler(context, this.plugin).register();
} else { } else {
try { try {
logger.info("Patching the server...");
RuntimePatcher.patch(this.plugin); RuntimePatcher.patch(this.plugin);
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException("Failed to patch server", e); throw new RuntimeException("Failed to patch server", e);

View File

@@ -113,7 +113,6 @@ warning.config.image.missing_char: "<yellow>Issue found in file <arg:0> - The im
warning.config.image.codepoint_conflict: "<yellow>Issue found in file <arg:0> - The image '<arg:1>' is using a character '<arg:3>(<arg:4>)' in font <arg:2> that has been used by another image '<arg:5>'.</yellow>" warning.config.image.codepoint_conflict: "<yellow>Issue found in file <arg:0> - The image '<arg:1>' is using a character '<arg:3>(<arg:4>)' in font <arg:2> that has been used by another image '<arg:5>'.</yellow>"
warning.config.image.invalid_codepoint_grid: "<yellow>Issue found in file <arg:0> - Image '<arg:1>' has an invalid 'chars' codepoint grid.</yellow>" warning.config.image.invalid_codepoint_grid: "<yellow>Issue found in file <arg:0> - Image '<arg:1>' has an invalid 'chars' codepoint grid.</yellow>"
warning.config.image.invalid_char: "<yellow>Issue found in file <arg:0> - Image '<arg:1>' has a char parameter containing combining characters, which may result in image splitting.</yellow>" warning.config.image.invalid_char: "<yellow>Issue found in file <arg:0> - Image '<arg:1>' has a char parameter containing combining characters, which may result in image splitting.</yellow>"
warning.config.image.file_not_found: "<yellow>Issue found in file <arg:0> - PNG file '<arg:2>' not found for image '<arg:1>'.</yellow>"
warning.config.image.invalid_hex_value: "<yellow>Issue found in file <arg:0> - The image '<arg:1>' is using a unicode character '<arg:2>' that is not a valid hexadecimal (radix 16) value.</yellow>" warning.config.image.invalid_hex_value: "<yellow>Issue found in file <arg:0> - The image '<arg:1>' is using a unicode character '<arg:2>' that is not a valid hexadecimal (radix 16) value.</yellow>"
warning.config.recipe.duplicate: "<yellow>Issue found in file <arg:0> - Duplicated recipe '<arg:1>'. Please check if there is the same configuration in other files.</yellow>" warning.config.recipe.duplicate: "<yellow>Issue found in file <arg:0> - Duplicated recipe '<arg:1>'. Please check if there is the same configuration in other files.</yellow>"
warning.config.recipe.missing_type: "<yellow>Issue found in file <arg:0> - The recipe '<arg:1>' is missing the required 'type' argument.</yellow>" warning.config.recipe.missing_type: "<yellow>Issue found in file <arg:0> - The recipe '<arg:1>' is missing the required 'type' argument.</yellow>"
@@ -350,3 +349,5 @@ warning.config.selector.invalid_target: "<yellow>Issue found in file <arg:0> - T
warning.config.resource_pack.item_model.conflict.vanilla: "<yellow>Failed to generate item model for '<arg:0>' because this item model has been occupied by a vanilla item.</yellow>" warning.config.resource_pack.item_model.conflict.vanilla: "<yellow>Failed to generate item model for '<arg:0>' because this item model has been occupied by a vanilla item.</yellow>"
warning.config.resource_pack.item_model.already_exist: "<yellow>Failed to generate item model for '<arg:0>' because the file '<arg:1>' already exists.</yellow>" warning.config.resource_pack.item_model.already_exist: "<yellow>Failed to generate item model for '<arg:0>' because the file '<arg:1>' already exists.</yellow>"
warning.config.resource_pack.model.generation.already_exist: "<yellow>Failed to generate model because the model file '<arg:0>' already exists.</yellow>" warning.config.resource_pack.model.generation.already_exist: "<yellow>Failed to generate model because the model file '<arg:0>' already exists.</yellow>"
warning.config.resource_pack.generation.missing_texture: "<yellow>Missing texture: '<arg:0>'.</yellow>"
warning.config.resource_pack.generation.missing_model: "<yellow>Missing model: '<arg:0>'.</yellow>"

View File

@@ -79,7 +79,6 @@ warning.config.image.invalid_font_chars: "<yellow><arg:0> dosyasında sorun bulu
warning.config.image.missing_char: "<yellow><arg:0> dosyasında sorun bulundu - '<arg:1>' resmi gerekli 'char' argümanı eksik.</yellow>" warning.config.image.missing_char: "<yellow><arg:0> dosyasında sorun bulundu - '<arg:1>' resmi gerekli 'char' argümanı eksik.</yellow>"
warning.config.image.codepoint_conflict: "<yellow><arg:0> dosyasında sorun bulundu - '<arg:1>' resmi, <arg:2> yazı tipinde başka bir resim '<arg:5>' tarafından kullanılmış olan '<arg:3>(<arg:4>)' karakterini kullanıyor.</yellow>" warning.config.image.codepoint_conflict: "<yellow><arg:0> dosyasında sorun bulundu - '<arg:1>' resmi, <arg:2> yazı tipinde başka bir resim '<arg:5>' tarafından kullanılmış olan '<arg:3>(<arg:4>)' karakterini kullanıyor.</yellow>"
warning.config.image.invalid_codepoint_grid: "<yellow><arg:0> dosyasında sorun bulundu - '<arg:1>' resminin geçersiz bir 'chars' kod noktası ızgarası var.</yellow>" warning.config.image.invalid_codepoint_grid: "<yellow><arg:0> dosyasında sorun bulundu - '<arg:1>' resminin geçersiz bir 'chars' kod noktası ızgarası var.</yellow>"
warning.config.image.file_not_found: "<yellow><arg:0> dosyasında sorun bulundu - '<arg:1>' resmi için '<arg:2>' PNG dosyası bulunamadı.</yellow>"
warning.config.image.invalid_hex_value: "<yellow><arg:0> dosyasında sorun bulundu - '<arg:1>' resmi, geçerli bir onaltılık (16 tabanlı) değer olmayan '<arg:2>' unicode karakterini kullanıyor.</yellow>" warning.config.image.invalid_hex_value: "<yellow><arg:0> dosyasında sorun bulundu - '<arg:1>' resmi, geçerli bir onaltılık (16 tabanlı) değer olmayan '<arg:2>' unicode karakterini kullanıyor.</yellow>"
warning.config.recipe.duplicate: "<yellow><arg:0> dosyasında sorun bulundu - Yinelenen tarif '<arg:1>'. Diğer dosyalarda aynı yapılandırmanın olup olmadığını kontrol edin.</yellow>" warning.config.recipe.duplicate: "<yellow><arg:0> dosyasında sorun bulundu - Yinelenen tarif '<arg:1>'. Diğer dosyalarda aynı yapılandırmanın olup olmadığını kontrol edin.</yellow>"
warning.config.recipe.missing_type: "<yellow><arg:0> dosyasında sorun bulundu - '<arg:1>' tarifi gerekli 'type' argümanı eksik.</yellow>" warning.config.recipe.missing_type: "<yellow><arg:0> dosyasında sorun bulundu - '<arg:1>' tarifi gerekli 'type' argümanı eksik.</yellow>"

View File

@@ -113,7 +113,6 @@ warning.config.image.missing_char: "<yellow>在文件 <arg:0> 发现问题 - 图
warning.config.image.codepoint_conflict: "<yellow>在文件 <arg:0> 发现问题 - 图片 '<arg:1>' 在字体 <arg:2> 中使用的字符 '<arg:3>(<arg:4>)' 已被其他图片 '<arg:5>' 占用</yellow>" warning.config.image.codepoint_conflict: "<yellow>在文件 <arg:0> 发现问题 - 图片 '<arg:1>' 在字体 <arg:2> 中使用的字符 '<arg:3>(<arg:4>)' 已被其他图片 '<arg:5>' 占用</yellow>"
warning.config.image.invalid_codepoint_grid: "<yellow>在文件 <arg:0> 发现问题 - 图片 '<arg:1>' 的 'chars' 码位网格无效</yellow>" warning.config.image.invalid_codepoint_grid: "<yellow>在文件 <arg:0> 发现问题 - 图片 '<arg:1>' 的 'chars' 码位网格无效</yellow>"
warning.config.image.invalid_char: "<yellow>在文件 <arg:0> 发现问题 - 图片 '<arg:1>' 的 'char' 参数包含组合字符可能导致图片分裂</yellow>" warning.config.image.invalid_char: "<yellow>在文件 <arg:0> 发现问题 - 图片 '<arg:1>' 的 'char' 参数包含组合字符可能导致图片分裂</yellow>"
warning.config.image.file_not_found: "<yellow>在文件 <arg:0> 发现问题 - 图片 '<arg:1>' 的 PNG 文件 '<arg:2>' 未找到</yellow>"
warning.config.image.invalid_hex_value: "<yellow>在文件 <arg:0> 发现问题 - 图片 '<arg:1>' 使用的 Unicode 字符 '<arg:2>' 不是有效的十六进制值</yellow>" warning.config.image.invalid_hex_value: "<yellow>在文件 <arg:0> 发现问题 - 图片 '<arg:1>' 使用的 Unicode 字符 '<arg:2>' 不是有效的十六进制值</yellow>"
warning.config.recipe.duplicate: "<yellow>在文件 <arg:0> 发现问题 - 重复的配方 '<arg:1>' 请检查其他文件中是否存在相同配置</yellow>" warning.config.recipe.duplicate: "<yellow>在文件 <arg:0> 发现问题 - 重复的配方 '<arg:1>' 请检查其他文件中是否存在相同配置</yellow>"
warning.config.recipe.missing_type: "<yellow>在文件 <arg:0> 发现问题 - 配方 '<arg:1>' 缺少必需的 'type' 参数</yellow>" warning.config.recipe.missing_type: "<yellow>在文件 <arg:0> 发现问题 - 配方 '<arg:1>' 缺少必需的 'type' 参数</yellow>"

View File

@@ -188,6 +188,7 @@ public class Config {
UpdaterSettings UpdaterSettings
.builder() .builder()
.setVersioning(new BasicVersioning("config-version")) .setVersioning(new BasicVersioning("config-version"))
.addIgnoredRoute(PluginProperties.getValue("config"), "resource-pack.delivery.hosting", '.')
.build() .build()
); );
try { try {

View File

@@ -242,6 +242,8 @@ public class TemplateManagerImpl implements TemplateManager {
result.put(placeholder, NullTemplateArgument.INSTANCE); result.put(placeholder, NullTemplateArgument.INSTANCE);
} else if (rawArgument instanceof Number number) { } else if (rawArgument instanceof Number number) {
result.put(placeholder, new ObjectTemplateArgument(number)); result.put(placeholder, new ObjectTemplateArgument(number));
} else if (rawArgument instanceof Boolean booleanValue) {
result.put(placeholder, new ObjectTemplateArgument(booleanValue));
} else { } else {
// 将参数字符串化后,应用参数再放入 // 将参数字符串化后,应用参数再放入
Object applied = applyArgument(rawArgument.toString(), parentArguments); Object applied = applyArgument(rawArgument.toString(), parentArguments);