mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-22 05:02:35 +00:00
Fix not clearing user's permissions, and issue with unsetting permissions
This commit is contained in:
5 files changed
+29
-9
No files matched your search
@@ -61,10 +61,12 @@ public abstract class UserManager extends AbstractManager<UUID, User> {
|
||||
|
||||
@Override
|
||||
public void copy(User from, User to) {
|
||||
to.setNodes(from.getNodes());
|
||||
to.setPrimaryGroup(from.getPrimaryGroup());
|
||||
giveDefaultIfNeeded(to, true);
|
||||
to.refreshPermissions();
|
||||
if (from.getPrimaryGroup() != null) {
|
||||
// This isn't just a black user. we shouldn't override in that case.
|
||||
to.setNodes(from.getNodes());
|
||||
to.setPrimaryGroup(from.getPrimaryGroup());
|
||||
to.refreshPermissions();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user