Skip to content

Commit 23f4658

Browse files
Merge pull request #245 from proferabg/master
Fix UnsupportedOperationException on AbstractImmutableMap
2 parents efc4781 + c77c248 commit 23f4658

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

protocolize-velocity/src/main/java/dev/simplix/protocolize/velocity/util/AdventureNbtToQuerzNbtMapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package dev.simplix.protocolize.velocity.util;
22

33
import java.util.ArrayList;
4+
import java.util.HashMap;
45
import java.util.List;
56
import java.util.Map;
67

@@ -98,7 +99,7 @@ private static Class<? extends Tag> adventureTagTypeToQuerz(BinaryTagType<? exte
9899
public static BinaryTag querzToAdventure(Tag<?> tag) {
99100
if (tag instanceof CompoundTag) {
100101
CompoundTag compoundTag = (CompoundTag) tag;
101-
Map<String, BinaryTag> entries = Map.of();
102+
Map<String, BinaryTag> entries = new HashMap<>(compoundTag.size());
102103
for (Map.Entry<String, Tag<?>> entry : compoundTag.entrySet()) {
103104
entries.put(entry.getKey(), querzToAdventure(entry.getValue()));
104105
}

0 commit comments

Comments
 (0)