9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-30 20:39:10 +00:00

fix(bukkit): 修复调试棒在使用时出现操作 ImmutableMap 的问题

This commit is contained in:
jhqwqmc
2025-06-18 21:35:24 +08:00
parent 1f263f0142
commit 3441429776

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) {