RottenFood

RottenFood

A plugin that gives all food products in Minecraft an expiry time, which when ended would leave the food spoiled and inedible. This is to combat the stockpiles of food users inevitably have stored in their homes and encourage the hospitality economy in towns and player interactions.

Features:

  • Let the food in your inventory turn rotten, like in real life!
  • Perfect for RPG/Survival/Realistic/RP/Prison Servers (where the food piles up).
  • Expiry continues to work in chests.
  • Expired food will apply effects from config.
  • Effects are customizable on a per-food basis, as well as rot times.
  • More features will follow!

Todo:

  • A hook into MVdW's placeholder api.
  • An addition to the lore that says the date it will expire.
  • More customizations for time (for internationalization).
  • Crushing bugs.

Commands:

  • /expiry - shows time left until food that is in hand expires

Permissions:

  • No permissions, only the config.yml file

Installation:

  1. Add this plugin to your plugins folder.
  2. If you wish to use the penalty feature, add VaultAPI and an economy plugin.
  3. Reload the server. You are now able to configure it to your liking.

Milestones

  • 10 downloads
  • 25 downloads
  • 50 downloads
  • 100 downloads
  • 250 downloads
  • 1000 downloads

Configuration File

metrics: true
foods:
  DEFAULT:
     # How many seconds it takes this food type to expire.
    expire-time: 15
    # How much money to penalize the eater (if Vault is enabled.)
    penalty: 50
      # Commands listed here will be executed when a player eats expired food..
      # %name%    :: the name of the player (username).
      # %uuid%    :: the uuid of the player (Mojang UUID).
      # %food%    :: the name of the food (i.e. COOKED_BEEF).
      # %food-id% :: the ID of the food (for those scrubs who haven't converted yet).
    commands:
      console:
        - "say %name% (%uuid%) ate expired %food% (%food-id%)."
      player:
        - "/me wishes they didn't eat that expired food!"
    # The potion effects.
    # Get the name from https://jd.bukkit.org/org/bukkit/potion/PotionEffectType.html
    # "EFFECT_NAME:DURATION(seconds):AMPLIFIER"
    effects:
      - "CONFUSION:10:3"
      - "BLINDNESS:10:3"
      - "HUNGER:10:3"
      
      
  COOKED_BEEF:
    # How many seconds it takes this food type to expire.
    expire-time: 15
    # How much money to penalize the eater (if Vault is enabled.)
    penalty: 50
      # Commands listed here will be executed when a player eats expired food..
      # %name%    :: the name of the player (username).
      # %uuid%    :: the uuid of the player (Mojang UUID).
      # %food%    :: the name of the food (i.e. COOKED_BEEF).
      # %food-id% :: the ID of the food (for those scrubs who haven't converted yet).
    commands:
      console:
        - "say %name% (%uuid%) ate expired %food% (%food-id%)."
      player:
        - "/me wishes they didn't eat that expired food!"
    # The potion effects.
    # Get the name from https://jd.bukkit.org/org/bukkit/potion/PotionEffectType.html
    # "EFFECT_NAME:DURATION(seconds):AMPLIFIER"
    effects:
      - "CONFUSION:10:3"
      - "BLINDNESS:10:3"
    
# If you wish to use the penalty feature, this must be enabled.
# In addition, it requires Vault and any economy plugin compatible.
enable-economy: true
lang:
  # When a player consumes rotten food.
  consumed-expired: "&cYou just ate expired food."
  # When a player tries to use /expires on a non-food item (an item that is not edible).
  not-food: "&cThe item in your hand is not food, thus does not expire."
  # When a player uses /expires and it gives them how long. (%time% for formatted time)
  expires-in: "&aThis food item expires in %time%."
  # When a player uses /expires on an item that has expired. (%time% for formatted time)
  expired: "&cThis food item has already expired! It expired  %time% ago."

Misc.

This plugin uses MCStats.org as a metrics provider. It collects anonymous usage data by default and can be turned off in the config. Please consider keeping this harmless data collection on as it really helps me as a developer know how you are using my plugin and how I can improve it.

This plugin is fully copyrighted under U.S. and international law. Any infringements will receive DMCA takedown requests as soon as possible. Please link to this page instead of transferring the JAR file because it helps me as a developer get an accurate measure of how many people are using it. Thanks :)


Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

  • Project ID
    97151
  • Created
    Jan 11, 2016
  • Last Released File
    Jan 19, 2016
  • Total Downloads
    944
  • License

Categories

Members

Recent Files