Revert "Fix possible nullref"

This reverts commit a99bbee900.
This commit is contained in:
Mike Primm 2021-07-14 15:08:55 -05:00
parent d8d41eb39b
commit 40fb487fcd
6 changed files with 18 additions and 18 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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