mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-08-26 07:22:56 +02:00
More optimization (charAt(0))
This commit is contained in:
parent
70c235d4f0
commit
5a9b573309
|
@ -601,9 +601,9 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface {
|
|||
for (String access : user.getPermissionList()) {
|
||||
if (comparePermissionString(access, permission)) {
|
||||
result.accessLevel = access;
|
||||
if (access.startsWith("-")) {
|
||||
if (access.charAt(0) == '-') {
|
||||
result.resultType = PermissionCheckResult.Type.NEGATION;
|
||||
} else if (access.startsWith("+")) {
|
||||
} else if (access.charAt(0) == '+') {
|
||||
result.resultType = PermissionCheckResult.Type.EXCEPTION;
|
||||
} else {
|
||||
result.resultType = PermissionCheckResult.Type.FOUND;
|
||||
|
@ -631,9 +631,9 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface {
|
|||
for (String access : group.getPermissionList()) {
|
||||
if (comparePermissionString(access, permission)) {
|
||||
result.accessLevel = access;
|
||||
if (access.startsWith("-")) {
|
||||
if (access.charAt(0) == '-') {
|
||||
result.resultType = PermissionCheckResult.Type.NEGATION;
|
||||
} else if (access.startsWith("+")) {
|
||||
} else if (access.charAt(0) == '+') {
|
||||
result.resultType = PermissionCheckResult.Type.EXCEPTION;
|
||||
} else {
|
||||
result.resultType = PermissionCheckResult.Type.FOUND;
|
||||
|
|
Loading…
Reference in New Issue
Block a user