Merge pull request #3544 from kosma/fabric-1.18-permissions

[Fabric 1.18] Fix permission handling
This commit is contained in:
mikeprimm 2021-12-03 12:45:25 -06:00 committed by GitHub
commit 79b41fc94a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -307,7 +307,7 @@ public class DynmapPlugin {
boolean hasPerm(PlayerEntity psender, String permission) {
PermissionsHandler ph = PermissionsHandler.getHandler();
if ((psender != null) && ph.hasPermission(psender.getName().getString(), permission)) {
if ((ph != null) && (psender != null) && ph.hasPermission(psender.getName().getString(), permission)) {
return true;
}
return permissions.has(psender, permission);
@ -315,7 +315,7 @@ public class DynmapPlugin {
boolean hasPermNode(PlayerEntity psender, String permission) {
PermissionsHandler ph = PermissionsHandler.getHandler();
if ((psender != null) && ph.hasPermissionNode(psender.getName().getString(), permission)) {
if ((ph != null) && (psender != null) && ph.hasPermissionNode(psender.getName().getString(), permission)) {
return true;
}
return permissions.hasPermissionNode(psender, permission);