TimedPermissions

Discussion in 'Archived: Plugin Requests' started by Icefuzion, Feb 13, 2013.

  1. Offline

    Icefuzion

    Plugin category: Admin Tools (Permissions)
    Suggested name: TimedPermissions. Can't think of any other name.
    What I want: As I wrote on this thread, I need a plugin that allows me to give timed permission nodes of choice to certain players (donators) for a set amount of time (eg. 3h, 3d). However, these timed permissions should be based on play time on the server, not real time.

    So for example, if I want a certain player to have the permission essentials.fly for 60min, that 60min timer would only countdown as long as the player is on the server. If the player logs off, the timer stops. If he logs on again, it starts again. If the timer reaches 0, essentials.fly gets removed.

    I think it would be best used in combination with a MySQL database to read and write the date/times and other data. Since I think it would be hard to do in plain text if it counts down every minute/second?

    Ideas for commands:
    It could be similar to PermissionsEx way of doing it. Would be nice if world-specific permissions could be added, but for me personally that's not a highly needed feature.

    /tper add <playername> <permission.node> <time in s|m|h|d|w>
    /tper list <playername>
    /tper remove <playername> <permission.node>
    /tper modify <playername> <permission.node> <time in s|m|h|d|w>
    /tper add <playername>

    These are all off the top of my head, by the way.

    Ideas for permissions:
    timedpermissions.list: lists the timed permissions that you currently have + (approximate) time remaining;
    timedpermissions.list.other: lists timed permissions of another player (for mods);
    timedpemissions.admin: all permissions, including but not limited to add, remove, modify.

    _____________________________

    I think this is one of those plugins that we don't have yet (not on bukkit anyways) but one that people actually need. I think it's a shame PermissionsEx does not support this (the permissions vanish as soon as the player logs out).
     
  2. Offline

    Mitch_

    There are plugins that allow you to do this.
     
  3. Offline

    Icefuzion

    Then please, by any means, give me an example of one.
     
  4. Offline

    Mitch_

    Im not sure what it is. You have to set different ranks for each one.But it you look up stuff like in game timer you will find one, there is many.
     
  5. Offline

    Icefuzion

    I've looked and I cannot find anything that I need. If you're talking about plugins like OnTime or AutoRank, that's not what I need.
     
  6. Offline

    Mitch_

    Oh yh thats them, if i could learn to code i would make this as it would be good for my server xD
     
  7. Offline

    Edge209

    OnTime v3.6.3 can do exactly what you want. Please see here for a tutorial on how to set it up: http://dev.bukkit.org/server-mods/o...ewards/#w-admin-givith-and-admin-takeith-away

    For your specific case though the configuation will be slightly differnt:

    /ontime rewards add perm essentials.fly
    /ontime rewards indi 1
    /ontime rewards exclusive 1 add VIP
    /ontime rewards add deny essentials.fly 3d 3h total
    /ontime rewards link 1 2

    1. First command establishes the reward of "fly" permission
    2. Second command establishes it as an "individual" (inid) reward so that it is not auomtatically issued to anyone. (requires a manual command)
    3. Third command makes it exclusive so it can only be members of the spcified group, in this example I have a goup I call "VIP"
    4. Fourth command creates the "reward" to remove the permission after 3days 3hours of play "total" time.
    5. Last command links the two such that as soon as the premission is granted, the second is scheduled and the clock starts ticking for every minute they play. They will NOT be penalized for time onine but AFK.

    Then to give this to a player, you would just "set" it.

    / ontime rewards set <playername> 1

    If no time is specified the player will receive the reward immediaely if online, or within a few seconds of their next login if they are offline.

    One last improvement you can make is to change the message dispalyed to the user when the permission is taken away. By default it will congratulate them for losing the permission.


    / ontime message add no_fly [player] , your flying time has expired. Re-subscribe and you will be back in the air!

    /ontime rw edit 2 msg=no_fly

    1. First command creates a message with messageTag = no_fly. The rest is the content of the message. [player] will be replaced with the players name when displayed to them.
    2. Second command sets this message for rewardID=2
     
  8. Offline

    Icefuzion

    Oh.. right.. that's why I asked if you had an IRC so I could ask you this :p
    Thanks, I will look into this. It seems that I didn't really think this through and didn't really consider adding the player to a group temporarily.
     

Share This Page