mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-23 17:47:34 +01:00
Prevent players who have never logged in before from taking over existing accounts.
This commit is contained in:
parent
0364d4e0de
commit
b0187698b9
@ -229,4 +229,5 @@ v2.1:
|
|||||||
- Add UUID support.
|
- Add UUID support.
|
||||||
Plugins can still query by player name but a UUID is faster and preferable.
|
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.
|
- Set a default mirror map if none is found in the config.
|
||||||
- Fix clones forgetting sub groups.
|
- Fix clones forgetting sub groups.
|
||||||
|
- Prevent players who have never logged in before from taking over existing accounts.
|
@ -155,7 +155,7 @@ public class WorldDataHolder {
|
|||||||
// Search for a LastName match
|
// Search for a LastName match
|
||||||
for (User usr : getUserList()) {
|
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
|
// Clone this user so we can set it's uUID
|
||||||
user = usr.clone(uUID, currentName);
|
user = usr.clone(uUID, currentName);
|
||||||
|
Loading…
Reference in New Issue
Block a user