Why UUIDs for worlds? [Edit: Configs in world folders?]

Players will be able to change their name in the future, thats why they should be referenced by their UUID.

Bukkit and Sponge also use UUIDs to identify worlds.

After some research, I found out that World UUIDs are not a Minecraft feature.

Why is it necessary to use a different Identifier than a world’s name? Do you want to make it possible to rename a world?

If an admin wants to rename a world, all world names in config files of world-related plugins have to be renamed as well.

Plugins could force admins to use the UUID to reference a world in a config instead of the name, or replace world names with UUIDs when the server starts for the first time (PermissionsBukkit did that when player UUIDs were added, it’s a mess).

Right now I’m using the world UUID to reference worlds in my plugin. The problem is that my plugin also needs to know the name of an unloaded world ('You own 6 plots in ').

I created a UUID <--> name database table to solve that problem, but that’s not a good solution and requires a lot of extra work. Other plugins might need the same information, so they will create the same mapping tables, result: Duplicated information.


There are 3 ways to solve this problem:

  1. Just ignore the existence of world UUIDs and use the world name
  2. UUID <--> name map in Sponge (only solves unloaded world name issue, not the config issue)
  3. Remove world UUIDs from Sponge
  4. Put world-related configs into the world folder. Then admins don’t have to reference worlds with names.

I think 2. and 4. would solve the problem without removing UUIDs




From a server admin perspective, I’d much prefer option 2. Changing the name of worlds is such a hassle as it is now. Granted, it’s not something I do often, but when I do I have to dig through at least half a dozen configs of various sorts. Having them point to the UID instead of the world name would be extremely practical :slight_smile:

I welcome the labeling of world’s by uuid, and here’s why.

I attempted to make a forge mod recently, and a big part of how it behaved was based on what dimension you were in. To my disappointment, the getDimwnsion method always said I was in the overworld (returned an integer value of 0), and when I tried to check the world name, it returned “mpserver” every time, every dimension. I should clarify too, this was on singleplayer.

I think UUIDs wouldn’t be such a bad idea. What if there’s a plugin dedicated to multi-world support that wanted to implement name changing? Unless you could track what it renames, then you may end up with broken references in your own plugin. So naturally, a unique identifier apart from a String name would seem like an obvious solution. Although, I see what you mean by a resolving method from name --> UUID or vice versa.

putting the configs into the world folder would solve the problem as well. Just thought about that.

That would mean one version of every config for each world you have, though. Will probably get hairy with 10+ worlds.

Or one file for all plugins?

Benefits of Config(s) in world folder:

  • Easy to rename a world
  • Copying a world to a new server also copies
    related configs