andune / HomeSpawnPlus

Home/Spawn control plugin for Bukkit
GNU General Public License v3.0
13 stars 10 forks source link

Updated HomeSpawnUtils.isNewPlayer() to support 1.7.9 #10

Closed zhro closed 10 years ago

zhro commented 10 years ago

Updated HomeSpawnUtils.isNewPlayer() to support 1.7.9. This method breaks with the new player UUIDs and it not backwards compatible.

If it is possible to detect whether the server version is older than 1.7.9 then a backwards-compatible update and be pushed at a later date. I don't know how to do this and have asked the appropriate question on the bukkit forums.

andune commented 10 years ago

Thanks. I think an easy fix is just for HSP to check for both names and UUID; if either file exists the player is assumed to have played before. This covers both pre-1.7.9 and 1.7.9 nicely without having to detect server version (something Bukkit team has intentionally not exposed).

Also, I have started a UUID branch for the 1.7 code base; UUIDs are going to have far-reaching impact on HSP since it stores player names in the DB today. Work is under way to provide an update. It's the HSP work I hate the most, however; updating the DB for existing servers is such a pain to get right and requires extensive testing. In any case, if you want to see progress or even possibly contribute, feel free to check out the branch:

https://github.com/andune/HomeSpawnPlus/tree/UUID-1.7

zhro commented 10 years ago

That's a good idea. I've pushed a new commit with your suggested changes for backwards compatibility by checking for the presence of one or the other of the two possible player data files.

Hawxy commented 10 years ago

If it makes it easier, it would be great if you could get out a build that supports new databases with UUIDs out the door first, and then work on a converter. For people like me who are happy to use a new database, it would be helpful.

As a side note, you'll need to specify what needs to be done before using the essentials converter (aka do we convert before we use the latest essentials build with UUID support, or do we convert after).

andune commented 10 years ago

@303i I will build the functionality for UUIDs into the model first and then worry about DB upgrades. So yes, I can put a build up on Jenkins that has UUID functionality for a fresh start DB and when that's available, if you want to help test it that would be great.

Regarding essentials, I don't know. I haven't even looked into the converters, I suspect the file format for Essentials and others will have changed so I will have to update the converters as well.