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:
- Add this plugin to your plugins folder.
- If you wish to use the penalty feature, add VaultAPI and an economy plugin.
- 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 :)
update please 1.12.2 Best RP plugin !!! can you add a auto check and a display on the item and spoiled food turn in a rotthen meat please ;-)
update please 1.12.2 Best RP plugin !!!
@IrusVirus
Thanks for the feedback, but I've long since left Minecraft development. Any changes will probably have to come from a different plugin.
@IrusVirus
Thanks for the feedback, but I've long since left Minecraft development. Any changes will probably have to come from a different plugin.
Here's my feedback:
(sry for my bad english :S)
@Hmmcrunchy
Thanks :P
@20zinnm
Cool will vote. Thanks bit of a mind bender that issue XD
@Hmmcrunchy
It should tag an entire stack at once so that stack will stack. However, you can't mix somewhat expired food with non-expired food because it joins the ItemStack.
I've created an issue on the Spigot bug tracker to add a monitor event so I can make sure that when other plugins give items to players (i.e. /i or /give) it can tag it then, avoiding this issue. Voting for it at https://hub.spigotmc.org/jira/browse/SPIGOT-1434 it might get implemented sooner.
@20zinnm
good luck :)
oh slight issue some of my players have, the items expiry lore make it a new item, so they wont stack together filling inventory with single carrots for example XD
@0ct0ber
Thanks! It was an interesting project.
@Hmmcrunchy
@Hmmcrunchy I've sent a fully enforceable DMCA takedown to the ISP. Thanks for the advice, but I try to support my plugins as much as possible. I'll be adding a thing to the onenable to tell them to download it here or risk getting malware.
Thanks! 20zinnm
@20zinnm
Id would just refuse to support any request from people downloading from that site.. I take it they decompile it which is a shame .. I know how long these things take
keep up the great work..
Unfortunately, some other (Chinese) website has been hosting my code for a bit now. I just want to explain why that's not fair to me.
I spent a lot of time writing this plugin. When you host it elsewhere, I can't assure people that they have the latest version without malware. However, I still have to deal with their complaints when it does come up.
If you like this plugin, link to it. Don't offer another download link or I will send another DMCA takedown request.
@vitorjordaop
I'm not aware of anything that would make it not, but I've only tested it in 1.8 and as such can only guarantee 1.8.
Thanks for the inquiry!
@Syon1xx
I'll take a look. It probably has to do with how it loads the items. It does not take into account metadata. https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html has all the item names how they should be entered (but it would only work if they are edible :P).
Thanks for the concerns! In the future, please use the ticket tracker so I can keep this organized.
It works for 1.7?
20zinnm,
I have been experimenting with your mod today and found that i could set an expiry successfully for majority of food items, but was unsuccessful with several. Including Raw chicken, raw pork, carrots, potatoes, fish, cooked fish, salmon, cooked salmon, mushroom stew.
Any recommendations for fixes?
@DongYanbo
Please private message me more details, but I'm sure we can work something out. Don't do it without my permission though, as this is all rights reserved.
Hello,I'm a Chinese.This is a cool plugin.Can I reprinted it to Chinese website www.mcbbs.net?
@NinomotoMoviesYT
The mods need to approve it. It's also available at SpigotMC if you don't mind not having it checked.