Describe the bug
I have code like this:
WrappedGameProfile playerProfile = new WrappedGameProfile(uuid, name);
for (ProfileProperty property : profile.getProperties()) {
playerProfile.getProperties().put(property.getName(), new WrappedSignedProperty(property.getName(), property.getValue(), property.getSignature()));
}
Exception since 1.21.9 is
Could not set profile property
java.lang.UnsupportedOperationException
at com.google.common.collect.ImmutableMultimap.put(ImmutableMultimap.java:506)
at com.google.common.collect.ForwardingMultimap.put(ForwardingMultimap.java:104)
at ProtocolLib.jar//com.comphenix.protocol.wrappers.GuavaWrappers$1.put(GuavaWrappers.java:95)
at ProtocolLib.jar//com.comphenix.protocol.wrappers.collection.ConvertedMultimap.put(ConvertedMultimap.java:117)
at CubesideNPCs.jar//de.cubeside.npcs.EntityPacketAdapter.onPacketSpawnEntity(EntityPacketAdapter.java:162)
at CubesideNPCs.jar//de.cubeside.npcs.EntityPacketAdapter.onPacketSending(EntityPacketAdapter.java:87)
Possible solution
I think adding a constructor for WrappedGameProfile that also takes the properties map and directly creates a nms GameProfile with properties is the best solution.
Describe the bug
I have code like this:
Exception since 1.21.9 is
Possible solution
I think adding a constructor for WrappedGameProfile that also takes the properties map and directly creates a nms GameProfile with properties is the best solution.