Hey there, I'm looking for someone to create a plugin that will slow down cocoa pod growth, as it seems like they grow extremely fast. Sorry I can't give any details, as I'm not exactly sure how this would work (BlockGrowEvent, if cocoa pod, event setSpeed (?) would be my best guess). I'm assuming you could use some sort of multiplier; please make that configurable so I can test with whatever values feel comfortable. If you'd like to just paste, I'll compile and test and all of that. Thanks!
necrodoom No. I know when to format it and when not to. Formatting is a guideline, not a rule. For example, when there is no category, no commands, no permissions, no missing information, and no deadline, that's when you know you don't have to format. Unless you're trying to troll, which in that case... No. It's 1:00 AM. :3 EDIT: Well, I'm off to bed. G'night, world o' Bukkit.
Read the read-me-first (I have highlighted the correct section for you) BTW I can confirm this is possible! EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Fine, I'll tag some beloved developers. calebbfmv WarmakerT -_Husky_- MrBluebear3 hawkfalcon Woobie sharp237 @(too tired to tag more)
If no one does this I have a few ideas on how to make this simply, just make a random number generator, and use a range that can be configured in a config. so if range is 100 then the rnd # gen would get a number from 0-99 and if it is equal to 0 then grow, else cancel. You can make it more likely by making the range smaller like 5. 0-4, if it is zero then it would grow, etc.
np98765 This is untested, but give it a try anyway Code: public class Restrictor extends org.bukkit.plugin.java.JavaPlugin implements org.bukkit.event.Listener { private double percentage; public void onEnable() { getDataFolder().mkdir(); java.io.File c = new java.io.File(getDataFolder(), "config.yml"); if(!c.exists()) saveDefaultConfig(); this.percentage = getConfig().getDouble("percentage"); getServer().getPluginManager().registerEvents(this, this); } @org.bukkit.event.EventHandler public void onGrow(org.bukkit.event.block.BlockGrowEvent e) { if(e.getNewState().getType() != org.bukkit.Material.COCOA) return; double rand = (double)(Math.random() * 101.0); if(rand > this.percentage) e.setCancelled(true); } }