main/0-6/config.yml

Example of a fully edited food item:

food:
  apple:
    hearts: 14
    food: 6
    saturation: 12.5
    potion: [REGENERATION/3/60; FAST_DIGGING/1/150/67%]
    effect: [xp/10,100/20%]

Here's what's going to happen, if the player eats that apple:

  • Regain 7 hearts
  • Refill 3 hunger units
  • Add 12.5 to the saturation (which is a lot)
  • 60 seconds of regeneration 3, 67% change to get 150 seconds of haste (FAST_DIGGING)
  • 20% change to get between 10 and 100 xp


If food items or values are missing in the configuration file, the plugin will not interfere with the vanilla mechanics -> if you only need to change the settings, you can delete the entire food section to get the cleanest look.

Full world configuration template file

#######################
#    Custom Health    #
# World Configuration #
#######################

# What world(s) do you want this specific configuration file to apply to?
# Example: "worlds: world1, world2, world_nether"
# Leaving it empty specifies that this file will apply to no world.
worlds: 


settings:

  # Do you want the player to regain health from having enough of their
  # food bar filled up?
  regain-health: true

  # Here you can change the maximum amount of "hunger units" that a player can have.
  # By default, it is set to 20 units. Setting it to a number outside the range from 0 to 20 will be ignored by the plugin.
  # 
  # Example: "max-food-level: 10" - Your hunger bar can be, at most, half full (5 units) at any given time.
  # Example: "max-food-level: 6" - Your hunger bar can only be 3 units full, preventing the player to sprint.
  # Example: "max-food-level: -1" - Mechanic in the game will not be touched by the plugin.
  max-food-level: -1
  
  # Here you can decide whether or not the player should get hungry at any given time.
  # Setting it to "false" means that the player will not lose any hunger units.
  change-food-level: true



# Coming up next is the food section, where you can configure the properties of eating food.
# Note that even though IDs for food items and potion effects are accepted, we recommend using the actual
# names to prevent the plugin from breaking when future bukkit versions are released.
# 
# Here is a format you can use.
#
# <NAME@DATAVALUE>:
#   health: <whole number from "0" to "20", including negative numbers>
#   hunger: <whole number from "0" to "20", including negative numbers>
#   saturation: <whole number from "0" to "20", including negative numbers>
#   potion: [<POTIONNAME/POWER/DURATION/CHANCE>; <POTIONNAME/POWER/DURATION/CHANCE>; <etc.>]
#   effect: [<parameter>; <parameter>; <parameter>; <etc.>]
# 
# If parameters or food items are missing or invalid, the plugin will not interfere with the vanilla mechanics.
# Specifying no data value on the item means to assume that the data value is "0". So "GOLDEN_APPLE" is assumed to be "GOLDEN_APPLE@0".
# 
# About potion effects:
#   - Not all of the parameters have to be specified, but they must be in the right order
#   - Power has to be an integer, starting at 1. (Default: 1)
#   - Duration is an integer set in seconds. (Default: 30)
#   - Chance can be a percentage from 0% to 100%. (Default: 100%)
# 
# About "effect":
#   - This parameter is for extra effects that don't qualify as potion effects
#   - "xp": Give the player experience like this: "effect: [xp/<INTEGER>/<CHANCE>]" where "<INTEGER>" specifies the amount of experience that the consumer receives.
#   - "burn": Set the player on fire: "effect: [burn/<DURATION>/<CHANCE>]" where "<DURATION>" is the amount of seconds (default: 10)
#   - "clear": Remove all potion effects, same as the milk bucket does: "effect: [clear/<CHANCE>]"
#   - "override": Overrides the effects from the original food item (eg. no hunger effect from rotten flesh): "effect: [override]"
#   - "cmd": Let the player perform a command: "effect: [cmd/<COMMAND>/<CHANCE>]" where "<COMMAND>" must not include the '/' at the beginning
#   - "cancel": Prevent the player from eating the food item. Note: if cancelled, absolutely NO values will be applied: "effect: [cancel]"
# 
# Chances will be set to 100% by default.
# 
# All numbers CAN additionally include a second value (eg.: "10,13"). If specified, the plugin will use a random value in that range (in this case 10, 11, 12 or 13)
# This does NOT include potion ID's or names, chance percentages, effect names and commands.
# 
# Here an example with explanation at the end.
# GOLDEN_APPLE@1:
#   health: 14
#   hunger: 6
#   saturation: 12.5
#   potion: [REGENERATION/3/60; FAST_DIGGING/1/150/67%]
#   effect: [xp/10,100/20%; override]
# 
# This is an enhanced golden apple. Eating it restores 7 entire hearts and 3 entire food units. Note how they measure "half-units", not entire units. It will also restore 12.5 points of saturation.
# It will also apply level 3 regeneration for 60 seconds, guaranteed, along with a 2/3 chance of applying level 1 haste for 150 seconds.
# Eating this golden apple will have a 20% chance of giving the consumer 10 and up to 100 points of experience.
# You will not get any of the vanilla potion effects, due to the "override" parameter.
# 
# Again, if food items or parameters are missing, the plugin will not interfere with the vanilla mechanics! 

food:
  apple:
    hearts: 0
    food: 4
    saturation: 2.4
  
  baked_potato:
    hearts: 0
    food: 6
    saturation: 7.2
  
  bread:
    hearts: 0
    food: 5
    saturation: 6
  
  cake_block:
    hearts: 0
    food: 2
    saturation: 0.4
  
  carrot_item:
    hearts: 0
    food: 4
    saturation: 4.8
  
  cooked_beef:
    hearts: 0
    food: 8
    saturation: 12.8
  
  cooked_chicken:
    hearts: 0
    food: 6
    saturation: 7.2
  
  cooked_fish:
    hearts: 0
    food: 5
    saturation: 6
  
  cookie:
    hearts: 0
    food: 2
    saturation: 0.4
  
  golden_apple:
    hearts: 0
    food: 4
    saturation: 9.6
  
  golden_apple@1:
    hearts: 0
    food: 4
    saturation: 9.6
  
  golden_carrot:
    hearts: 0
    food: 6
    saturation: 14.4
  
  grilled_pork:
    hearts: 0
    food: 8
    saturation: 12.8
  
  melon:
    hearts: 0
    food: 2
    saturation: 1.2
  
  milk_bucket:
    hearts: 0
    food: 0
    saturation: 0
  
  mushroom_soup:
    hearts: 0
    food: 6
    saturation: 7.2
  
  poisonous_potato:
    hearts: 0
    food: 2
    saturation: 1.2
  
  pork:
    hearts: 0
    food: 3
    saturation: 1.8
  
  potato_item:
    hearts: 0
    food: 1
    saturation: 0.6
  
  pumpkin_pie:
    hearts: 0
    food: 8
    saturation: 4.8
  
  raw_beef:
    hearts: 0
    food: 3
    saturation: 1.8
  
  raw_chicken:
    hearts: 0
    food: 2
    saturation: 1.2
  
  raw_fish:
    hearts: 0
    food: 2
    saturation: 1.2
  
  rotten_flesh:
    hearts: 0
    food: 4
    saturation: 0.8
  
  spider_eye:
    hearts: 0
    food: 2
    saturation: 3.2

Comments

Posts Quoted:
Reply
Clear All Quotes