isXander / YetAnotherConfigLib

YetAnotherConfigLib (yacl) is just that. A builder-based configuration library for Minecraft.
GNU Lesser General Public License v3.0
96 stars 36 forks source link

Add Enum Dropdown Controller #117

Closed kevinthegreat1 closed 9 months ago

kevinthegreat1 commented 11 months ago

Adds a Dropdown Controller for Enums and a test option.

The code is modeled after the existing dropdown controllers added in #95 and supports any enum option.
For default, Enum#toString is used to get the display name of the enum constant, which is the name of the enum constant by default. However, users are encouraged to override the toString method in their enum or supply a custom toString function with EnumDropdownControllerBuilder#getFactory.

This PR is being upstreamed from Skyblocker. See how we're using this controller here.