Fix /playerinfo others check.

This commit is contained in:
bloodshot 2020-01-31 11:08:21 -05:00
parent ef9324efd1
commit d4b99f5f74
2 changed files with 4 additions and 2 deletions

View File

@ -114,8 +114,9 @@ public void execute(CommandSender src, @Optional String[] args) throws InvalidCo
}
// otherwise if no permission to delve into another player's claims data or self
if ((user != null && user != src && !src.hasPermission(GDPermissions.COMMAND_PLAYER_INFO_OTHERS))) {
if (user != null && user.getOnlinePlayer() != src && !src.hasPermission(GDPermissions.COMMAND_PLAYER_INFO_OTHERS)) {
TextAdapter.sendComponent(src, MessageCache.getInstance().PERMISSION_PLAYER_VIEW_OTHERS);
return;
}

View File

@ -114,8 +114,9 @@ public void execute(CommandSource src, @Optional String[] args) throws InvalidCo
}
// otherwise if no permission to delve into another player's claims data or self
if ((user != null && user != src && !src.hasPermission(GDPermissions.COMMAND_PLAYER_INFO_OTHERS))) {
if (user != null && user.getOnlinePlayer() != src && !src.hasPermission(GDPermissions.COMMAND_PLAYER_INFO_OTHERS)) {
TextAdapter.sendComponent(src, MessageCache.getInstance().PERMISSION_PLAYER_VIEW_OTHERS);
return;
}