Skip to content

Commit

Permalink
Fix NAMEPLATE_EDIT permissions not triggering the no permissions badge
Browse files Browse the repository at this point in the history
  • Loading branch information
UnlikePaladin committed Oct 3, 2023
1 parent 78aa762 commit 6f27e2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Expand Up @@ -63,6 +63,11 @@ private void renderNameTag(AbstractClientPlayer player, Component text, PoseStac

// customization boolean, which also is the permission check
boolean hasCustom = custom != null && avatar.permissions.get(Permissions.NAMEPLATE_EDIT) == 1;
if (custom != null && avatar.permissions.get(Permissions.NAMEPLATE_EDIT) == 0) {
avatar.noPermissions.add(Permissions.NAMEPLATE_EDIT);
} else if (avatar != null) {
avatar.noPermissions.remove(Permissions.NAMEPLATE_EDIT);
}

// enabled
if (hasCustom && !custom.visible) {
Expand Down
1 change: 1 addition & 0 deletions common/src/main/resources/assets/figura/lang/en_us.json
Expand Up @@ -143,6 +143,7 @@

"figura.badges.no_permissions.init_inst": "Script overran resource limits",
"figura.badges.no_permissions.complexity": "Model too complex",
"figura.badges.no_permissions.nameplate_edit": "Could not edit nameplate",
"figura.badges.no_permissions.bb_animations": "Model Animations too complex",
"figura.badges.no_permissions.texture_size": "Custom Textures too huge",
"figura.badges.no_permissions.particles": "Reached Particles limit",
Expand Down

0 comments on commit 6f27e2d

Please sign in to comment.