From 174ef187e851936b8823c9795a378fd6e0e111b9 Mon Sep 17 00:00:00 2001 From: Luck Date: Sun, 18 Mar 2018 10:02:16 +0000 Subject: [PATCH] Rename role parameter in PermissionDescription.Builder#assign --- .../sponge/service/proxy/api6/DescriptionBuilder.java | 10 +++++----- .../sponge/service/proxy/api7/DescriptionBuilder.java | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sponge/sponge-service-api6/src/main/java/me/lucko/luckperms/sponge/service/proxy/api6/DescriptionBuilder.java b/sponge/sponge-service-api6/src/main/java/me/lucko/luckperms/sponge/service/proxy/api6/DescriptionBuilder.java index 53006f16..8550ce02 100644 --- a/sponge/sponge-service-api6/src/main/java/me/lucko/luckperms/sponge/service/proxy/api6/DescriptionBuilder.java +++ b/sponge/sponge-service-api6/src/main/java/me/lucko/luckperms/sponge/service/proxy/api6/DescriptionBuilder.java @@ -72,9 +72,9 @@ public final class DescriptionBuilder implements PermissionDescription.Builder { @Nonnull @Override - public PermissionDescription.Builder assign(@Nonnull String permission, boolean value) { - Objects.requireNonNull(permission, "permission"); - this.roles.put(permission, Tristate.fromBoolean(value)); + public PermissionDescription.Builder assign(@Nonnull String role, boolean value) { + Objects.requireNonNull(role, "role"); + this.roles.put(role, Tristate.fromBoolean(value)); return this; } @@ -90,8 +90,8 @@ public final class DescriptionBuilder implements PermissionDescription.Builder { // Set role-templates LPSubjectCollection subjects = this.service.getCollection(PermissionService.SUBJECTS_ROLE_TEMPLATE); for (Map.Entry assignment : this.roles.entrySet()) { - LPSubject subject = subjects.loadSubject(assignment.getKey()).join(); - subject.getTransientSubjectData().setPermission(ContextSet.empty(), this.id, assignment.getValue()); + LPSubject roleSubject = subjects.loadSubject(assignment.getKey()).join(); + roleSubject.getTransientSubjectData().setPermission(ContextSet.empty(), this.id, assignment.getValue()); } this.service.getPlugin().getPermissionVault().offer(this.id); diff --git a/sponge/sponge-service-api7/src/main/java/me/lucko/luckperms/sponge/service/proxy/api7/DescriptionBuilder.java b/sponge/sponge-service-api7/src/main/java/me/lucko/luckperms/sponge/service/proxy/api7/DescriptionBuilder.java index 954765bf..2b6312bc 100644 --- a/sponge/sponge-service-api7/src/main/java/me/lucko/luckperms/sponge/service/proxy/api7/DescriptionBuilder.java +++ b/sponge/sponge-service-api7/src/main/java/me/lucko/luckperms/sponge/service/proxy/api7/DescriptionBuilder.java @@ -72,9 +72,9 @@ public final class DescriptionBuilder implements PermissionDescription.Builder { @Nonnull @Override - public PermissionDescription.Builder assign(@Nonnull String permission, boolean value) { - Objects.requireNonNull(permission, "permission"); - this.roles.put(permission, Tristate.fromBoolean(value)); + public PermissionDescription.Builder assign(@Nonnull String role, boolean value) { + Objects.requireNonNull(role, "role"); + this.roles.put(role, Tristate.fromBoolean(value)); return this; } @@ -90,8 +90,8 @@ public final class DescriptionBuilder implements PermissionDescription.Builder { // Set role-templates LPSubjectCollection subjects = this.service.getCollection(PermissionService.SUBJECTS_ROLE_TEMPLATE); for (Map.Entry assignment : this.roles.entrySet()) { - LPSubject subject = subjects.loadSubject(assignment.getKey()).join(); - subject.getTransientSubjectData().setPermission(ContextSet.empty(), this.id, assignment.getValue()); + LPSubject roleSubject = subjects.loadSubject(assignment.getKey()).join(); + roleSubject.getTransientSubjectData().setPermission(ContextSet.empty(), this.id, assignment.getValue()); } this.service.getPlugin().getPermissionVault().offer(this.id);