KyleMelton32 / Giants

4 stars 6 forks source link

Enable/Disable blockDamage and setFire for Explosions #9

Open Darunia18 opened 10 years ago

Darunia18 commented 10 years ago

I would like to suggest possibly adding a way to set whether you want explosions (created from stomp attack and possibly jump attack) to destroy blocks or set fire. Currently, jump attack does not destroy blocks, but stomp attack does. I'm not sure which file actually creates the explosion (Attacks.java or GiantListeners.java), but if it is GiantListeners, this could be an easy fix (replacing line 361's createExplosion event from using location, power to using x, y, z, power, setFire, breakBlocks).

This probably doesn't make too much sense because I'm not familiar with Bukkit too much, but I've coded some similar things in PHP (for Pocket Edition server plugins), but you can just use http://jd.bukkit.org/rb/doxygen/dd/daa/interfaceorg_1_1bukkit_1_1World.html#a658553aedb81f30c95d7178e26c450eb as reference.

Thanks for considering this! If you are too busy to do this yourself (with school starting for many), I can make a pull request after I bugtest some changes, as long as I know which file to edit (Attacks.java or GiantListeners.java). Thank you for your time on this plugin! I really love it and this is one of only two problems I've had with it so far (as giants are destroying peoples' land).

KyleMelton32 commented 10 years ago

Hi Darunia18, I have slowly been moving attacks out of the listeners and into attacks.javs to maybe one day create an decent API.

Good news is I actually was planning such a thing.

Thanks, Mammothskier

Darunia18 commented 10 years ago

Ok sounds good! :D Thanks for the update.

On a side note, do you have any plans to add a way so that giants will only spawn at night?

ghost commented 10 years ago

i can probably make a PR with those features.

lemee see what i can do tomorrow with ti