Prevent players who have never logged in before from taking over existing accounts.

This commit is contained in:
ElgarL 2014-05-04 16:17:31 +01:00 committed by KHobbits
parent 0364d4e0de
commit b0187698b9
2 changed files with 3 additions and 2 deletions

View File

@ -230,3 +230,4 @@ v2.1:
Plugins can still query by player name but a UUID is faster and preferable.
- Set a default mirror map if none is found in the config.
- Fix clones forgetting sub groups.
- Prevent players who have never logged in before from taking over existing accounts.

View File

@ -155,7 +155,7 @@ public class WorldDataHolder {
// Search for a LastName match
for (User usr : getUserList()) {
if (usr.getLastName().equalsIgnoreCase(currentName)) {
if (usr.getLastName().equalsIgnoreCase(currentName) && !usr.getUUID().equalsIgnoreCase(usr.getLastName())) {
// Clone this user so we can set it's uUID
user = usr.clone(uUID, currentName);