Faster Eating Speed

Discussion in 'Plugin Requests' started by souperdudeman, Feb 28, 2020.

Thread Status:
Not open for further replies.
  1. Offline


    Plugin category: Mechanics
    Minecraft version: 1.15.2/Latest
    Suggested name: Faster Eating

    What I want:

    ability to configure the amount of time it takes to eat food items.
    - ability to configure the eating time of every edible item individually.

    Ideas for commands: No commands needed for this plugin. All configuration will hopefully be acomplished with a plugin config file.

    Ideas for permissions: no permissions required. I would prefer functionality to be applied to all players universally.

    When I'd like it by: I'd be ecstatic if it ever comes my way.
    Last edited: Mar 1, 2020
  2. Offline


    Unfortunately there are too many complications, im not sure if this can be done, but i cant do it :(
    Last edited: Apr 11, 2020
  3. Offline


    I'm terribly sorry I forgot about this. I am busy and don't have time to do this but I left some thoughts on it if anyone else wants to do it:
    Place all Material.values().stream.filter(Material::isEdible) in the config with a time of 0 (default because there's no efficient way to get the eating speed for each item). You listen to PlayerItemConsumeEvent and check if the item is edible. You store the slot and itemstack and start a runnable with the time in the config (if it's bigger than 0). In the runnable you check if slot and itemstack match and set the event item to air and fill the hunger/saturation. Now that's the point where I stopped because bukkit/spigot doesn't provide a way to retrieve that information. You have to resort back to NMS which I haven't looked into so far. Unfortunately I cannot publish my existing code because due to COVID I'm not at my main pc which has the project. Though this information still helps to whomever wants to give it a shot.
    souperdudeman and zThana like this.
Thread Status:
Not open for further replies.

Share This Page