TNT below a certain level.

Discussion in 'Archived: Plugin Requests' started by Nikve, Sep 30, 2012.

  1. Offline

    Nikve

    Plugin category: Mechanics/Fix

    Suggested name: TntLevel

    What I want: I'd like to see a plugin that lets players only place and use tnt bellow a certian level so it can only be used for mining, instead of risking that griefers blow up other peoples house.

    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: tntlevels.canuse - Allows someone to use tnt bellow a certian level, without this permission you should not be able to use tnt at all. tntlevels.nolimit - Allows the player to use tnt without any restrictions.

    When I'd like it by: As soon as possible.
     
  2. Offline

    jorisk322

    Well, it's almost impossible to allow just some of your users to use tnt, because they can use flint 'n steel on blocks next to the tnt. You CAN block tnt above a specified level, and you CAN block direct ignition of the TNT.

    EDIT: And of course you can block the placement of tnt by some of your users, which would really help a lot.

    If you're OK with that, I might make this.
     
  3. Offline

    Nikve

    jorisk322
    Thats what I meant when I said block them from using tnt, sorry I wasnt clear enough.
    I'd be really happy if you could make this :)
     
  4. Offline

    jorisk322

    Ok, I'll start working on it. What should be the default level above which TNT will be blocked?
     
  5. Offline

    Nikve

  6. Offline

    jorisk322

    http://dl.dropbox.com/u/13782344/bukkit/TNTLevel.jar
    It's currently set to level 60 (so above 60 is blocked). Above that level, people without permission TNTLevel.nolimit can't place tnt, but they can still ignite it if it's already there. By default everyone can use tnt below level 60, but you can disable that by giving them a negative version of TNTLevel.use.
    Tell me if it works out for you, and what changes you want to be made.
    EDIT: Have changed level to 50 in link.
     
  7. Offline

    Nikve

    Thanks a lot man, that was fast.
    I will keep you updated on how it goes.
     
  8. Offline

    Kiakaha

    This is a great Idea guys. I'l be using it myself. Thanks both of you.
     
  9. Offline

    sharp237

    Someone could place tnt underground and then use pistons to move it above ground, then ignite it and Boom.
     
    izak12345678910 likes this.
  10. Offline

    RingOfStorms

    ... did you just say that it was impossible to block that flint 'n steel, tsk tsk
     
  11. Offline

    JayzaSapphire

     
  12. Offline

    Necrodoom

    might as well just blow up an underground base
     
  13. Offline

    RingOfStorms

    Doesn't mean you can't block it...
     
  14. Offline

    Lolmewn

    EntityPrimeEvent - if entity is TNT block (there's a special entity for that) and location is above some level, block it. Should completely block everything ^^
     
  15. Offline

    JayzaSapphire

    You can't perm node that.
     
  16. Offline

    Lolmewn

    I'm sure you can get the cause of the ignition.
     
  17. Offline

    JayzaSapphire

    You can, you just can't get a player out of it.
     
  18. Offline

    Technius

    It is possible if you log every single TNT placement with a HashMap<Block, Player>.
     
  19. Offline

    JayzaSapphire

    Still, that's who placed it, not who lit it.
     
  20. Offline

    Technius

    Lighting is done with a PlayerInteractEvent.

    Check if the action is a left click, check if the player is holding flint and steel, and then check if the block is TNT.
     
  21. Offline

    Lolmewn

    (Like a bawz)
     
    Technius likes this.
  22. Offline

    RingOfStorms

    Yea but what if fire spread is on :)

    Either way you guys are way over thinking this one. Get back to topic
    Step 1: tntlevels.canuse,
    • On block place event, check if they got this, if not cancel.
    Step 2: tntlevels.canuse,
    • On block place event, check if they got this, if they do...
    • Check the configured level of place-able TNT, if it is higher than the configurated lvl, then cancel event
    Step 3: tntlevels.nolimit,
    • On block place event, check if they got this bypass the previous step.
    Done!
    Yea yea use piston to move tnt all the way up/down bla bla.. ok if someone goes throughout the trouble to do this then my gawd let them they deserve it. Start with just the request which was the placing of TNT, and if he wants the setting off to be added then add that on later! No reason to over think it so much guys.
     
    Kiakaha and Woobie like this.
  23. Offline

    Kiakaha

    jorisk322

    Hey mate I want to use this too but i find that 50 height still too high for my taste and setup

    Would you please recompile me a version with either
    • a 25 height limit
    • config option to choose the height? (ideally this)
    My thought Exactly :)
     
  24. Offline

    jorisk322

    I can't access the file today, but I will send you a modified version with the height set to 25 the day after that. Next weekend I probably will start working on the config, because that'll take some more time.
     
  25. Offline

    Kiakaha

    Im in no hurry, so if you were planning to do a config at some point then i'l just wait for that.

    Cheers buddy.
     
  26. Offline

    jorisk322

    Well, when I have access to my files again, it's really just 10 seconds of work to change it from 50 to 25, so :p
     
  27. Offline

    groveham

    This plugin is very useful and exactly what I'm looking for. Will it continue to be updated in the future? E.g. for the 1.4 update, etc, etc?

    Also, did a config file ever get implemented?

    Many thanks for this plugin! :)
     

Share This Page