Skip to content

Conversation

@MattDeWeerd
Copy link

What was changed:

  • Removes the use of `subColorItem.itemStack.asColorable()
  • Instead gets the SubColor color from LeatherArmorMeta's color property

Why this was changed

  • When using ChatControl, subColorItem.itemStack.asColorable() returned null.
    • This caused guiOutput to return an itemStack that did not have its color changed.
  • Switching to getting the color directly from the item meta fixes this issue

Things To Consider

  • Since this uses LeatherArmorMeta, the subcolor menu items must be LEATHER_HORSE_ARMOR
  • This also applies to the output item meaning POTION cannot be used as the cosmetic material
    • It seems there was already reports of POTION causing issues with HMCColor

Things To Look Out For

  • Unsure if all permission cases are caught here, so it would be good to test them before merging

@MattDeWeerd
Copy link
Author

Note: I did attempt to add a case for if the itemstack.itemMeta is either LeatherArmorMeta or PotionMeta, and while it did color the cosmetic in the output correctly, it didn't actually apply the cosmetic properly to the player, but instead allowed the player take the potion cosmetic out of the color menu which is not ideal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant