I have an idea for a plugin that when there is a lava source underneat an iron block it will damage everything that stands on that block is it possible and if so is there anyone willing to make it Thanx
It's pretty easy, I'll do it while I procrastinate working on other plugins. Try this: <link removed due to thread safety issues - when it's released it'll be safe> You will be damaged half a heart every 1/6 seconds when standing on iron blocks with lava underneath (3 hearts a second), and a full heart every 0.5 second when standing on iron ore with lava underneath (2 hearts a second). After stepping off of superheated iron ore, you'll be damaged half a heart per second (0.5 hearts per second), and after stepping off a superheated iron block, you'll be damaged half a heart per 0.75 second (2/3 hearts per second). Is the damage rate good? Should I change anything before releasing? EDIT by Moderator: merged posts, please use the edit button instead of double posting.
Just a suggestion: perhaps a config file for choosing what damage amounts you want? It wouldn't be too hard and would make the plugin more reusable.
That's a good idea. I could use this default config (which is what it's using now): Code: --- - standing_damage: delay: 750 damage: 2 interval: 500 cooldown_damage: grace: 2 damage: 1 interval: 1000 length: 3000 blocks: - 15 - 10 - standing_damage: delay: 750 damage: 2 interval: 500 cooldown_damage: grace: 2 damage: 1 interval: 1000 length: 3000 blocks: - 15 - 11 - standing_damage: delay: 200 damage: 1 interval: 166.666666666667 cooldown_damage: grace: 2 delay: 100 damage: 1 interval: 750 length: 3000 blocks: - 42 - 10 - standing_damage: delay: 200 damage: 1 interval: 166.666666666667 cooldown_damage: grace: 2 delay: 100 damage: 1 interval: 750 length: 3000 blocks: - 42 - 11 This is in YAML, I'd change it to the Bukkit configuration format. Where standing_damage.delay is the delay before damage kicks in, standing_damage.damage is the damage to inflict (in half-a-hearts) while standing, standing_damage.interval is the time between damages in milliseconds, cooldown_damage.grace is the amount of standing damages needed to inflict cooldown damages, cooldown_damage.delay is the delay before cooldown damage starts, in milliseconds, cooldown_damage.damage is the damage (in half-a-hearts) to inflict for cooldown, cooldown_damage.interval is the time in milliseconds between cooldown damages, cooldown_damage.length is the length of the cooldown period (ms again), and blocks is a list of block IDs for the superheated blocks, from bottom to top, with 0 as a wildcard (so [0, 46] would mean get damaged when standing on anything with TNT under it, [7] would be getting damaged when standing on bedrock, [12, 12, 12, 19, 1] would be sand on top of sand on top of sand on top of sponge on top of smoothstone, [18] would make standing on trees bad for you, etc). That might be a little too configurable, but that's almost all the info it uses at the moment (the only other is how to interact when you're walking between them, and I suppose I could add that but it'd get messy, especially with lots of entries). Adding configuration would be pretty easy - I'd just have to change the onPlayerMove function (how it decides what damages to apply and how it decides to apply them) and the enum for why they're being damage. Something I've already rewritten from scratch (the old one was a nightmare because I had the smart idea of using multiple classes for each damage timer, and using a delay that was multiplied by 0.75 every time it was finished, and so on). That would change it from SuperheatedIron to Traps in general...
Tested it Works great thanks man Slight point of change even if you have godmode you can still die if you walk on this not that it matters because its pretty fun to kill a god but maybe you can change it thanks