This commit is contained in:
Luck 2016-12-04 23:09:12 +00:00
parent 8f9a1aa931
commit 1b7a66b41a
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B
3 changed files with 7 additions and 9 deletions

View File

@ -76,8 +76,8 @@ public class SpongeGroup extends Group {
private GroupSubject(LPSpongePlugin plugin, SpongeGroup parent) {
this.parent = parent;
this.plugin = plugin;
this.subjectData = new LuckPermsSubjectData(true, plugin.getService(), parent);
this.transientSubjectData = new LuckPermsSubjectData(false, plugin.getService(), parent);
this.subjectData = new LuckPermsSubjectData(true, plugin.getService(), parent, this);
this.transientSubjectData = new LuckPermsSubjectData(false, plugin.getService(), parent, this);
}
@Override

View File

@ -77,8 +77,8 @@ public class SpongeUser extends User {
private UserSubject(LPSpongePlugin plugin, SpongeUser parent) {
this.parent = parent;
this.plugin = plugin;
this.subjectData = new LuckPermsSubjectData(true, plugin.getService(), parent);
this.transientSubjectData = new LuckPermsSubjectData(false, plugin.getService(), parent);
this.subjectData = new LuckPermsSubjectData(true, plugin.getService(), parent, this);
this.transientSubjectData = new LuckPermsSubjectData(false, plugin.getService(), parent, this);
}
private boolean hasData() {

View File

@ -69,6 +69,9 @@ public class LuckPermsSubjectData implements LPSubjectData {
@Getter
private final PermissionHolder holder;
@Getter
LPSubject parentSubject;
private void objectSave(PermissionHolder t) {
if (t instanceof User) {
service.getPlugin().getStorage().saveUser(((User) t))
@ -80,11 +83,6 @@ public class LuckPermsSubjectData implements LPSubjectData {
}
}
@Override
public LPSubject getParentSubject() {
return null;
}
@Override
public Map<ImmutableContextSet, Map<String, Boolean>> getPermissions() {
try (Timing ignored = service.getPlugin().getTimings().time(LPTiming.LP_SUBJECT_GET_PERMISSIONS)) {