Plenty of people have made autofeeders via command, but I've not found one that uses a worn helmet item that also consumes food items...so I made one.
This plugin adds a lore-based helmet item that will autofeed the player when worn. Helmets require the player to first fill the helm with food items. This is done by right-clicking (using) the helmet in their hand while they have food in their inventory. Each click causes the helmet to "eat" one food item from their inventory, and fill the helm's internal buffer. The internal buffer fill level is shown on a gauge on the tooltip under the "Savory I" lore (see pictures below).
When the player gets hungry (their food hanks decrease), the helmet will consume stored food to refill the player's hunger and saturation meters.
ALL HELMETS in the game (Leather, Chainmail, Iron, Golden, Diamond, and Netherite) can have the "Savory I" lore, which allows the autofeeding feature. Leather helmets can also be spawned dyed.
Empty Netherite Helmet
3/4 Full Netherite Helmet
My (poor) attempt at a "spotlight" of the plugin in action:
Commands:
/yummo help - shows the help menu
/yummo reload - reloads the config files
/yummo debug - debugging info (shows the numerical value of stored food)
/yummo maxfood [#] - shows the maximum food that can be stored. With optional number, will change
the config value (Defaults to 1331.2, or a stack of steak's default value)
/yummo food get <name> - looks up the food value of named item
/yummo food set <name> <number> - Changes the default food value for the named item (defaults to
vanilla Hunger + Saturation value). Should also be able to add new "food" items for the
helmet to consume using their item name ("resource location" on wiki).
/yummo food list - lists all food items available.
/yummo food remove <name> - attempts to remove food from the available list
/yummo <player> <type> [color] - Gives player a helm of the provided type
Valid Types: Netherite, Diamond, Gold, Iron, Chain, and Leather.
Leather Armor can be dyed with an optional RGB code (three numbers with spaces), a color
(tab-completion should show valid color names), or "random". If no valid color is given, none
is used and an undyed leather helmet is spawned.
Permissions:
yummo.reload: Reload config command, default: op
yummo.help: Help command, default: everyone
yummo.debug: debug command, default: op
yummo.spawnhelm: Allows spawning of Savory Helms, default: op
yummo.maxfood: Shows or sets the max food capacity config, default: op
yummo.food.list: List all foods available for Yummo Savory Helms, default: everyone
yummo.food.get: Gest the food value for a specific food, default: op
yummo.food.set: Set the food value for a specific food (or add new foods), default: op
yummo.food.remove: Remove a food from the available options, default: op
Food values and availability are fully configurable. Max capacity of the Savory helms is also fully configurable. Many of the colors (Lore color, gauge/fill meter colors) are also configurable. This should allow versatility of use between various servers/configurations for admins to customize to their needs.