Skip to content

Commit

Permalink
Set the size field to disabled if player isn't allowed to resize
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrbysco committed Sep 29, 2024
1 parent 2aa27a3 commit 9827765
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public void init() {
this.addWidget(this.sizeField);
this.sizeField.setTooltip(Tooltip.create(Component.translatable("armorposer.gui.tooltip.scale")));
if (minecraft != null && !Reference.canResize(minecraft.player)) {
this.sizeField.setEditable(false);
this.sizeField.active = false;
this.sizeField.setTooltip(Tooltip.create(Component.translatable("armorposer.gui.tooltip.size.disabled").withStyle(ChatFormatting.RED)));
}
Expand Down

0 comments on commit 9827765

Please sign in to comment.