LWC icon indicating copy to clipboard operation
LWC copied to clipboard

UUID not stored when manually using /lock

Open saladfingers opened this issue 10 years ago • 20 comments

LWC build: 931 Spigot 1.8

If autoRegister: private is added to the chest section of the config and a chest is placed, the UUID will be stored in the database and can be viewed with /cinfo.

However, if autoRegister: private is removed from the config and a chest is manually locked, the UUID will not be stored.

saladfingers avatar Feb 03 '15 22:02 saladfingers

and the other options, public and disabled?

Walkman100 avatar Feb 04 '15 04:02 Walkman100

public stores the UUID. Disabled has the same effect as removing the line and manually locking.

saladfingers avatar Feb 04 '15 05:02 saladfingers

I can confirm this. I've disabled AutoRegister on my server, and players have been using /lock for a longer period now. Didn't realise until today that database is filled with hardcoded IGN's and is not compatible with IGN-change. Permissions for additional people (/cmodify [IGN]) are stored as UUID, though.

hsols avatar Feb 04 '15 12:02 hsols

/lwc admin forceowner also saves the UUID. It just seems to be /lock that does not.

saladfingers avatar Feb 04 '15 20:02 saladfingers

so theres no option to convert the old database if autoRegister was disabled?

bambole avatar Feb 04 '15 21:02 bambole

Hi,

As of build #935 on Jenkins, LWC now correctly uses the UUID when using /lock and other commands.

Currently converting old protections is still in testing, from what I've tested it works fine and a couple others have confirmed the same. If anyone wants to try this as well, I'd really appreciate it. Remember to backup your database :-)

The test build can be obtained here: https://artifacts.getlwc.org/Hidendra/LWC/240/240.1/core/target/LWC.jar

When running it, the converter will start after all worlds load. It will look something like this:

[20:13:40 INFO]: Done (2.662s)! For help, type "help" or "?"
[20:13:41 INFO]: [LWC] Performing (relatively quick) UUID conversion for protections
[20:13:41 INFO]: [LWC] This might take a bit. Please be patient.
[20:13:41 INFO]: [LWC] Precaching offline players...
[20:13:41 INFO]: [LWC] Looking at all protections in the database...
[20:13:41 INFO]: [LWC]  Looked at 1000/60393 protections.
[...]
[20:13:48 INFO]: [LWC]  Looked at 60000/60393 protections.
[20:13:48 INFO]: [LWC] Quick conversion has been completed!
[20:13:48 INFO]: [LWC] Note: Only player names that __have logged into the server before__ will have been converted by this.
[20:13:48 INFO]: [LWC] If a player did e.g. /cmodify Notch but Notch has never logged into your server, it will still be Notch inside the database.
[20:13:48 INFO]: [LWC] If you run into this issue because a player has changed their name and can no longer access their commands, you can use: /lwc admin player2uuid <OldName> <NewName>
[20:13:48 INFO]: [LWC] However, keep in mind that the above command might be slow as it has to look at EVERY protection.

Gotchas:

  • Only players that have a .dat file on the server will be converted! This keeps the conversion very fast without having to hit Mojang's server. On my laptop, my database was converting at ~8.5k protections/sec.
  • Players that have changed their name (e.g. Bob to Alice) will likely not be able to access their protections anymore if they were stored with their username.

However, both of these can be fixed with a command: /lwc admin p2uuid FromName ToName. This takes in a player name (FromName), and looks for any players with that name in the database then converts it to the UUID of the second player (ToName). It can be used for converting players who changed their Minecraft name (/lwc admin p2uuid Bob Alice) or players who do not have a .dat file on the server (/lwc admin p2uuid Alice Alice). The only catch is the command involves a scan of the entire database, so it'll take just as long as the initial conversion (which may have been really short for you.)

Hidendra avatar Feb 05 '15 01:02 Hidendra

Everything seems to be working fine, thank you :)

saladfingers avatar Feb 05 '15 01:02 saladfingers

Great work Hidendra! Thanks very much.

ghost avatar Feb 05 '15 10:02 ghost

converter showed no errors, but players with new names can still not access their old chests.

i tried "/lwc admin p2uuid OldName NewName" it says Succesfully converted, but they arent. theres still the old name at chests.

bambole avatar Feb 05 '15 12:02 bambole

@bambole New names as in they changed their username? When it says "successfully converted" did it say it converted more than 0 protections (it says how many it changed)?

Hidendra avatar Feb 05 '15 12:02 Hidendra

@bambole Cant confirm that. For me all works fine.

ghost avatar Feb 05 '15 12:02 ghost

yes players changed their username it said 100x protections converted im using sqlite do you use mysql, aggro?

bambole avatar Feb 05 '15 12:02 bambole

@bambole yeah, I use mysql and recommend to use mysql for performance reasons.

ghost avatar Feb 05 '15 15:02 ghost

I ran the build here - https://artifacts.getlwc.org/Hidendra/LWC/240/240.1/core/target/LWC.jar

it didn't fix the locks that were manually done with /lock.
I'm sure new ones will be fixed but is there a way to "check all with username" and "convert to this username" ? or forcecheck the names int he database to be with the right UUIDs?

[16:08:23] [Server thread/INFO]: [LWC] Performing (relatively quick) UUID conversion for protections [16:08:23] [Server thread/INFO]: [LWC] This might take a bit. Please be patient. [16:08:23] [Server thread/INFO]: [LWC] Precaching offline players... [16:08:29] [Server thread/INFO]: [LWC] Looking at all protections in the database... [16:08:29] [Server thread/INFO]: [LWC] Looked at 1000/1134 protections. [16:08:29] [Server thread/INFO]: [LWC] Quick conversion has been completed! [16:08:29] [Server thread/INFO]: [LWC] Note: Only player names that have logged into the server before will have been converted by this. [16:08:29] [Server thread/INFO]: [LWC] If a player did e.g. /cmodify Notch but Notch has never logged into your server, it will still be Notch inside the database. [16:08:29] [Server thread/INFO]: [LWC] If you run into this issue because a player has changed their name and can no longer access their commands, you can use: /lwc admin player2uuid <OldName> <NewName>

Kainzo avatar Feb 05 '15 21:02 Kainzo

this didnt work in the startup covertion for all players but the fromname to name works ingame as far as i know

Aurorion avatar Feb 05 '15 21:02 Aurorion

Does the command convert protections with multiple users attached to it?

mibby avatar Feb 05 '15 22:02 mibby

I'm getting:

http://paste.md-5.net/bavihaheyi.avrasm

when the linked-above LWC version loads.

Protections seem to exist on all chests that I've checked (under names), and new-placed chests have UUIDs on /cinfo, and I can do lwc admin p2uuid on players.

rbos avatar Feb 06 '15 01:02 rbos

I tried this new build and it converted all my players to UUID correctly. I also use the admin command p2uuid and it worked correctly too. Great job on this! Thanks for all the time you saved us.

-Ender

EnderSandman avatar Feb 06 '15 16:02 EnderSandman

Protections are not converted upon plugin loading.

Console output: http://paste.md-5.net/yawugopoda.vbs

Spigot git-Spigot-b1e6da1-1092acb (MC: 1.8) (build date Jan 20th 2015) LWC: 4.5.0 SNAPSHOT (https://artifacts.getlwc.org/Hidendra/LWC/240/240.1/core/target/LWC.jar) Backend: MySQL 5.5 (MariaDB)

Conversion process starts, but does not perform any transactions, returns no information. Protections are still hardcoded as IGN only.

hsols avatar Feb 06 '15 20:02 hsols

Using the UUID build, seem to be having issues with purging players by their name. Had a user join, lock a bunch of chests, then get banned. Attempting to purge with their name didn't work.

mibby avatar Feb 08 '15 05:02 mibby