mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-21 02:42:01 +00:00
minimal optimizations
This commit is contained in:
parent
eea381e714
commit
cd8ef9361b
|
@ -967,15 +967,13 @@ public class AnjoPermissionsHandler extends PermissionsReaderInterface {
|
|||
public boolean comparePermissionString(String userAccessLevel, String fullPermissionName) {
|
||||
int userAccessLevelLength;
|
||||
if (userAccessLevel == null || fullPermissionName == null
|
||||
|| (userAccessLevelLength = userAccessLevel.length()) == 0 || fullPermissionName.length() == 0) {
|
||||
|| fullPermissionName.length() == 0 || (userAccessLevelLength = userAccessLevel.length()) == 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int userAccessLevelOffset;
|
||||
int userAccessLevelOffset = 0;
|
||||
if (userAccessLevel.charAt(0) == '+' || userAccessLevel.charAt(0) == '-') {
|
||||
userAccessLevelOffset = 1;
|
||||
} else {
|
||||
userAccessLevelOffset = 0;
|
||||
}
|
||||
if ("*".regionMatches(0, userAccessLevel, userAccessLevelOffset, userAccessLevelLength - userAccessLevelOffset)) {
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue