mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
More optimization (charAt(0))
This commit is contained in:
parent
70c235d4f0
commit
5a9b573309
1 changed files with 4 additions and 4 deletions
|
@ -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 a new issue