[REQ] Player Selective Creeper Explosions/Damage

Discussion in 'Archived: Plugin Requests' started by chaseoes, Aug 3, 2011.

  1. Offline

    chaseoes

    I'm not even sure if this is possible to do, but if it is, hopefully someone can figure out how!

    I recently pushed a small survey to the players on my server, and in one of the questions I asked about creepers. Through all the responses, this is the question they got most biased on. You see, as my server stands now, I have creepers nerfed not to do any damage.

    But apparently at least 50% of my players want the creepers to do damage (they like the survival aspect), while the other 50% threaten to quit if they do. So the solution? Let them pick! :p

    Basically, each user would be able to type a command, and this would either enable or disable creepers being able to explode to that player. E.g., User1 could choose to disable them, and when a creeper gets up next to User1, it won't explode but will simply despawn. But if User2 chooses to enable them, when a creeper gets up next to User2, it will explode like normal.

    Commands could be like so:
    Code:
    /cdamage on
    (alias would be /creeperdamage on)
    /cdamage off
    (alias would be /creeperdamage off)
    
    A config could be like so:
    Code:
    defaultdamage: enabled
    damageonmessage: 'You have enabled creeper damage!'
    damageoffmessage: 'You have disabled creeper explosions for your player!'
    
    The defaultdamage option would be if creepers are enabled or disabled by default for players who haven't chosen. Would support permissions and/or PermissionsBukkit. Possible MYSQL support (if doing something like this is even possible (if its not, it might be with BukkitContrib/Spout?)).

    Thanks!
     
  2. Offline

    IcySeal

    This seems simple enough. would it matter to you if say user 1 and user 2 were standing right next to one another then the creeper went off. I can also add support for other mobs to ignore players based on their their choice.
    I'll get to work on this right now.
     
  3. Offline

    chaseoes

    Awesome, thanks!

    As long as User2 was the one who triggered it then it should be fine.
    Oh, and Multiworld support would be great too. :p
     
  4. Offline

    IcySeal

    I've got most of it done now actually just clearing up some strange things.
     
  5. Offline

    chaseoes

    Alright, cool.
    Can't wait to try it out.
     
  6. Offline

    PatPeter

    Any update on this plugin?
     
  7. Offline

    chaseoes

    No, even though "most of it done now", it's been 3 months...
     
  8. Offline

    Belf

    @PatPeter
    @chaseoes

    Here it is :

    SelectiveCreeper - Download

    config.yml :
    Default state / message configuration

    players.yml :
    Storage of players configuration

    /cdamage state #Display your current state
    /cdamage state player #Display player current state


    /cdamage on|off #Enable or disable creeper damage
    >> Need to be Op or to have permission (bukkit built in permission / superperms) : selectivecreeper.change

    /cdamage player on|off #Enable or disable creeper damage for player
    >> Need to be Op or to have permission (bukkit built in permission / superperms) : selectivecreeper.changeother

    You need to restart the serverafter install, or player have to quit/join to be stored.

    This allow player to be affected or not by the explosion (player with damage enabled and blocks are still affected by the explosion)
     
  9. Offline

    chaseoes

    @Belf Wow, thanks! I'll give it a try and report back.
     
  10. Offline

    snikkers

    @Belf
    i guess he did not want to get blocks destroyed / damaged for players that have turned it off

    i guess what you did is cancel the damage event if damage source is creeper explosion right ?

    so you would have to catch the explode event, if this is creeper check if a player is in range that has creeper dmg turned off and then if true cancel the explode event

    i could provide you with the code if you want - but currently in my code there is no check for player / creeper - cause i just wanted explosions not to destroy anything (its for my creative plugin :D)
     
  11. Offline

    Belf

    @snikker
    Yeah I didn't know if he wanted this or not, there is a lots of plugin which disable Creeper Damage mine is perfectly compatible with them, and it's very easy to do it anyway. But thanks for the proposal ;-)

    Yeah that's it
     
  12. Offline

    chaseoes

    Yeah, I just tried it, but even after disabling it they still explode and cause block damage. :/

    @Belf
     
  13. Offline

    Belf

    @chaseoes

    It's because, I didn't make a block protection, but I can easily add it :
    If a protected player is near a Creeper explosion, the blocks aren't damaged
     
  14. Offline

    chaseoes

    I don't get it?
    I turn off damage, spawn a creeper, and it causes block damage. Is it supposed to do this? If so, can you make it so players don't cause it to have block damage too? It's supposed to still damage the player, but not the enviroment, and simply despawn.

    At least, this is how I wanted it:

    When you have damage disabled: Creepers will damage you, but not the environment (blocks).

    When you have damage enabled: Creepers will damage you and the environment (blocks).
     

Share This Page