Multiverse / Multiverse-3

12 stars 11 forks source link

Stop using world name. Start using world UUID. #3

Open dumptruckman opened 11 years ago

ghost commented 11 years ago

what?

socram8888 commented 11 years ago

Rather than using world names to identify the world in configuration files, inventories..., use worlds' UUID (Universal Unique IDentifier), so even if you create a new world with the same name, Multiverse wouldn't use the old configuration, as its UUID would be different.

Minecraft use the UUID rather than the world name to identify where's the player when quitting.

ryantheleach commented 7 years ago

As found in SpongePowered servers using the UUID for world identification ends up with a less then great user experience, considering users often copy the worlds, and reimport them cloning/changing the UUID.

UUID's are also pretty unfriendly for human entry.

It also seems that you always need to fall back to directory names anyway.

In short, UUID's are great for internal use only, like inventories or data.

Settings for worlds work best when stored in the world save directory directly, as then people copy the world configuration when they copy and rename worlds.

Also at this stage, the user's expectations are either that copying will lose association with configs, or that copying should maintain association with data.

Drawing the line between data and configuration is the hard part.

I suggest that the 'names' that are exposed to users in global configs are based on directory names. Use these in global configs, but not inventories or data, these or mvaliases are also probably your best bet for permissions, considering other plugins are also likely to use directory names in this manner.

Ingame use the multiverse alias, or the NBT name stored in the level.dat set by single player, or world editors, you will need to disambiguate when multiples exist, as it's not guarantee'd to be unique.