Whats New in Minecraft Snapshot 14w10a - Name Changing, UUID Bans

Whats New in Minecraft Snapshot 14w10a - Name Changing, UUID Bans

Posted in minecraft

Dinnerbone described Minecraft 14w10a as a "Big Bang" step towards name changing in Minecraft. As a result, Snapshot 14w10a contains the barebones of the name changing feature which affects many server commands - Ban lists, Whitelists etc.

The ability to change your name has been a sought after feature for many years now. No one has ever been able to change their original Minecraft name but there's hope in sight with these new API changes! Jeb promised that name changing will start when Minecraft 1.8 is released which is likely to be in May.

For now, 14w10a alters Commands that rely on player names. When you add someone to a whitelist or ban list their UUID is secretly stored on the list. This is great for new ban or whitelist additions but older lists will need to be updated to include UUID (unless Dinnerbone releases a tool).

Once a UUID is added to a list that player will never be able to escape the ban by changing their name. Similarly, if someone is on a whitelist then changing their name will not drop them off the allowed list.

What is a UUID?

A UUID is basically a unique identifier, and typically it's a number (128 bit) but it exists in other variants too. For example the MD5 hash version looks similar to a key code used to activate software or games:

e.g. 6ba7b810-9dad-11d1-80b4-00c04fd430c8

As you can imagine the UUID is the only way for Mojang to uniquely identify a player. Of course users do have Names and an Email Address but both of those could change once Minecraft 1.8 is released. Therefore the only reliable way to uniquely identify players is by UUID.

How can I get the UUID of a user in Minecraft?

Using web service

It's possible to get the UUID of a Minecraft user using the Mojang web service. You're going to need to call the Mojang API using the profiles page method e.g.

POST https://api.mojang.com/profiles/page/1 [{"name":"mrsmith", "agent":"Minecraft"}]

Two parameters: the name of the user and the agent being the name of the game.

Using Bukkit

Alternatively, if you're using Bukkit then the UUID property is exposed through the getUniqueId() method which returns a unique and persistent id for this entity.

To get a player from their name you would call getPlayer (part of the Bukkit class) and pass across the players name:

e.g. Player org.bukkit.Bukkit.getPlayer

The Player object inherits from Entity so the getUniqueId() method is directly callable once you've got the player object

Rules regarding name changing

  • You can't change to a name that's already taken by someone else
  • Changing your name will not get you unbanned - ban lists will recognise you via UUID
  • Every player has a UUID even if they haven't migrated to a Mojang account.
  • Players must migrate to a Mojang account before being able to change their name
  • Players can change their name as many times as they like
  • You will be able to change your name using the minecraft.net website

Other lesser known features included in 14w10

  • Wolves will attack skeletons - who will flee from the attacks
  • Clone command tweaked to make it more reliable
  • New gamerule to hide death messages