[REQ] Change Permissions Group Upon Death [FORMATTED]

Discussion in 'Archived: Plugin Requests' started by Unstable_Flight, Apr 28, 2012.

  1. Offline


    Plugin category: Admin Tools

    Suggested name: DeathGroup or DeathPermissions

    A bit about me: I've been running a server with a few buddies for a while. We love the awesome plugins you guys make for us!

    What I want: A plugin that will change someone's permissions group upon death. A config file with a space to write in the group they would switch to upon death. Also it should be compatible with PermissionsBukkit (http://dev.bukkit.org/server-mods/permbukkit/)

    Ideas for commands: /deathgroup reset (This would put everyone back into their original groups, it's not a requirement, but it would be nice to have.)

    Ideas for permissions:
    deathgroup.ignore (This would make the person not be affected by the plugin.)
    deathgroup.reset (Gives the player the ability to use /deathgroup reset)

    When I'd like it by: Take as long as you need, you guys have lives too.

    Similar plugin requests: I haven't seen any yet.

    Devs who might be interested in this: Anyone who feels up to it.

    Thanks guys! :)
  2. Offline


    this shouldn't be hard to implement, it can actually even move players to different groups based on their current group

    would you mind if this was dependent on Vault, since it's support for wide range of permission plugins is unbeaten?
  3. Offline


    i would say this is a admn plugin not admin tools
  4. Offline


    vault dependency is fine with me, I use it in conjunction with PermissionsBukkit anyways
  5. Offline


    fair enough, I'll start coding this tomorrow probably ;-)
  6. Offline


    Another small request for this plugin, if I may, any chance you could implement a way to launch commands when they die too, so I could change the perm group and also use other plugins to give items, teleports etc. Thanks!
  7. Offline


    I'll do my best :p
  8. Offline


    Hey zathrus, how's it coming? Any updates? Thanks again!
  9. Offline


    heya... sorry, I've been in no mood for coding this week, so I'm about to start and finish this on Tuesday - for real :)
    again, sorry for the delay
  10. Offline


    no worries man, thanks for doing it :)
  11. Offline


    I had a similar problem, so I made it. Here's the download.

    The name of the plugin and config file syntax is like it is because I may end up expanding it to do more things, then release it as a full-fledged plugin.

    It doesn't directly change the group of the player, but if you configure it to run a group-changing command, it will.

    EDIT: This is my first plugin, so if you find any bugs, let me know.
  12. Offline


    ok, it took a while but I've got it working and tested now... a new CommandsEX version will be released later tonight (CET), I've gotta prepare Wiki and stuff still

    when it's ready, I'll post a link for you (most probably you'd want to visit CommandsEX Builder Page to only tick a single checkbox there and download your feature :p)

    a few words about how it works:
    for a start, you'll have a config that looks like this:
    # here you can define into which group to move a player once they die
    # ... as you can see in the syntax example, you can use color codes in your commands as well
    # ... also, you can use $p as a placeholder for name of the player who just died
    # syntax:
    #  knight:
    #      toGroup: translucent
    #      command: say &eThe time has come for &f$p &eto move on. $p will now be joining ranks of light as a translucent lightkeeper.
            toGroup: default
            command: say &eAw, snap! &f$p &ehas just left the world of mortals and became a nameless wanderer again.
    # this sets time (in days) after which we delete old records of player groups from database
    # ... every time a player dies, his previous group is stored in database, so they can switch back to it via command.
    # ... for players that die and do not play on the server anymore, this time is used for cleanup purposes, so the database does not grow too large
    # ... set to 0 to disable (not recommended)
    deathGroupsCleanupTime: 14
    ... from the config, you can see that you define what group would player join upon his death (while loosing his previous group). In our example (the "syntax" part), player who is in the group "knight" will loose his membership in this group upon death and will be automatically assigned group "translucent".

    When this happens, a command that broadcasts what just happened to everyone by using the /say command will be run. Commands are run as console, so no permission check are required here.

    If you set up multiple group transitions, let's say one will be knight -> translucent and another one will be citizen -> default, the plugin will honor both group changes. First, it will remove knight and citizen groups for that player, then it will add translucent and default groups.

    If a player is not part of any of these groups, simply nothing will happen for him.

    Same principle works with /greset command, which is used to reset player's group back to what it was before they died. When used, this player will loose his translucent and default groups and will be assigned knight and citizen groups again.

    A few warnings:
    • this feature is dependent on Vault
    • you probably do not need to worry about SQL settings, CommandsEX uses SQLite in its default setting, which should be available in most (if not all) machines today. So you'll just see a file named minecraft.db in your CommandsEX folder - that is the database file where old players' groups are being stored.
    If there is anything you'd like to ask, go ahead. I shall return here in several hours when the new release is ready for consumption :)
  13. Offline


    ok, feature is now ready and live (documentation still pending, I was braindead yesterday, so I couldn't release until I got some sleep)... select "Death Group" from all the checkboxes at the Builder Page and click the download button at the end of that page to get your feature :)
  14. Offline


    Thanks so much man! This will be great! [cake]
    zathrus likes this.
  15. Offline


    sorry, forgot to mention that permission cex.deathgroup.ignore will make everyone with this permission ignore group changes after death :)

Share This Page