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

Merge pull request #232 from jhqwqmc/dev

fix(bukkit): 修复调试棒在使用时出现操作 ImmutableMap 的问题
This commit is contained in:
XiaoMoMi
2025-06-19 00:06:08 +08:00
committed by GitHub

View File

@@ -77,7 +77,7 @@ public class DebugStickListener implements Listener {
Object storedData = wrapped.getJavaTag("craftengine:debug_stick_state");
if (storedData == null) storedData = new HashMap<>();
if (storedData instanceof Map<?,?> map) {
Map<String, Object> data = MiscUtils.castToMap(map, false);
Map<String, Object> data = new HashMap<>(MiscUtils.castToMap(map, false));
String currentPropertyName = (String) data.get(blockId);
Property<?> currentProperty = block.getProperty(currentPropertyName);
if (currentProperty == null) {