Multiverse/Multiverse-Inventories — pull request #46 by azkedar (2012-04-16 23:47:27+00:00)
Title: Individual shareables respected when changing worlds indirectly

The default case, if the from and/or to worlds were not in the same group, was to not respect individual shareables and dump all data into the profile. Since data are serialized via a hash map, this caused a race condition/conflict where the profiles would store/apply their shares in an unpredictable way. That is, even though one group may want to declare a shareable, if any of the groups do not contain the from/to world, their shares could be overridden by the "Shareables.allOf()".

Basically, this causes the situation reported by Uncovery in the forum (I'm from his server). This commit just makes it so that the persistent profile always respects individual shares, so that the order in which profiles are applied is not important.

I've tested it, it compiles and passes the built-in tests, and it fixes the bug.