mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-08-31 00:20:34 +02:00
Maybe fix usernames not being updated in storage after name changes (#301)
This commit is contained in:
parent
306e252c31
commit
7b8654339c
|
@ -71,6 +71,15 @@ public class GenericUserManager extends AbstractManager<UserIdentifier, User> im
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public User getOrMake(UserIdentifier id) {
|
||||
User ret = super.getOrMake(id);
|
||||
if (id.getUsername().isPresent()) {
|
||||
ret.setName(id.getUsername().get(), false);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the user's state indicates that they should be persisted to storage.
|
||||
*
|
||||
|
|
|
@ -134,7 +134,11 @@ public class SpongeUserManager implements UserManager, LPSubjectCollection {
|
|||
|
||||
@Override
|
||||
public SpongeUser getOrMake(UserIdentifier id) {
|
||||
return objects.get(id);
|
||||
SpongeUser ret = objects.get(id);
|
||||
if (id.getUsername().isPresent()) {
|
||||
ret.setName(id.getUsername().get(), false);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user