Skip to main content

BetterFood

BetterFood is a small plugin that automatically eats supported vanilla food for players with the correct permission.

What It Does

  • watches hunger changes
  • chooses a valid food from the player's inventory
  • avoids consuming custom or protected food items

Commands and Permissions

  • betterfood.user (default true) — gates whether the auto-eat listener runs for that player and lets them use the toggles
  • betterfood.admin (default op) — gates the plugin update and setup commands
  • Commands: /betterfood and /bf

The player subcommands are:

  • /betterfood
  • /betterfood toggleEating
  • /betterfood toggleMessage

Running the base command toggles automatic eating. The toggleMessage subcommand controls action bar notifications that appear when food is consumed (e.g., "You ate some COOKED_BEEF"). The message uses the raw material name, so it appears in upper-case with underscores. The settings flow is player-only; console senders only get an informational message and cannot change player state. Both toggles are persisted per-player via the player's persistent data container, so they survive restarts.

The admin subcommands wrap the shared Nightbreak tooling and require betterfood.admin:

  • /betterfood setup — opens the in-game setup menu (plugin update status, automatic-update toggle, recommended plugins)
  • /betterfood recommendedplugins — lists plugins that work well with BetterFood
  • /betterfood downloadpluginupdate (alias /betterfood downloadall) — downloads a plugin update if one is available
  • /betterfood downloadallcontent — replies that BetterFood has no content packs

Important Notes

  • BetterFood is intentionally small and does not use the Nightbreak content-package flow — /betterfood downloadallcontent simply reports that there are no content packs to install.
  • It uses hunger-aware selection logic rather than simply consuming the highest-value food first.
  • The list of auto-eaten foods is hard-coded in the plugin. Foods with special or unpredictable effects (such as raw meats, golden apples, and chorus fruit) are intentionally left out and are kept only as commented-out reference entries in the source, so newly added vanilla foods are not auto-eaten until they are added to the supported list.
  • The shared MagmaCore tooling is bundled in: BetterFood checks for plugin updates on boot (and refreshes about once per hour), generates a config.yml with the nightbreak.autoDownloadPluginUpdates toggle (default false), and exposes the setup menu and recommended-plugins view. With the toggle on and a valid Nightbreak supporter token, plugin updates download automatically on startup and apply after a restart.
  • The plugin reports anonymous usage metrics through bStats (plugin id 4557).

See: