lucko / helper

A collection of utilities and extended APIs to support the rapid and easy development of Bukkit plugins.
MIT License
456 stars 87 forks source link

ItemStackBuilder#customModelData #143

Closed anjoismysign closed 1 year ago

anjoismysign commented 2 years ago

First off, I have no clue what shadow bukkit is. In case of this needing the method in ItemMeta, pull request would be useless.

Adds customModelData method to ItemStackBuilder. This is useful in case you are working with resource packs.

anjoismysign commented 1 year ago

Why revert?

lucko commented 1 year ago

It didn't compile

anjoismysign commented 1 year ago

I see. Why are we still using Bukkit 1.12? What's the issue with using latest bukkit? If it's because of Material enum, I can make a helper class oriented for ItemStackBuilder so it accepts building based from Strings. If it's not able to proceed, it can either return null or just fail fast however developer prefers 🤷🏻 An example of building from Strings is by passing the Material type so if you pass "BIRCH_DOOR_ITEM" and server software is running 1.13 or superior it will just not proceed. Developers would just provide the Material javadocs for their respective versions to their audience (server admins) the same way we are doing with the Sound enum 😄