Gamemode Specific Permissions

Discussion in 'Archived: Plugin Requests' started by Pookie21, May 12, 2013.

  1. Offline

    Pookie21

    Hey all,

    Im having a hard time believing that there is no plugin for this already, so if anyone finds something matching the description, let me know.

    Description:
    I want my players to be able to have separate permissions when in creative or in survival gamemodes. So, for example, when they are in creative mode, they have these permissions:
    factions.bypass
    essentials.*
    worldedit.*
    bukkit.command.*


    And when they are in survival, all i want them to be able to do is switch their game mode and maybe toggle downfall. So:
    essentials.gamemode
    bukkit.command.toggledownfall


    I just don't want them to have the permissions they would normally have in creative, while we're pvping in survival mode. (for example, i dont want them to be able to warp (so easily. i understand all they would have to do is discretely switch game modes quick and warp somewhere. But on that note, im always monitoring my server log and can see every command made, and also have dynmap up constantly, so i would be able to tell if they suddenly zip across the map when they're not supposed to.)) but i mean the plugin should/could put up a broadcast message when any player switches out of survival into creative, or visa-versa. (configurable).

    The plugin should basically be a permissions plugin that constantly checks the player file gamemode field and places the player in a permissions group accordingly.

    There you have it. Seems simple enough. Anyone have any ideas? I appreciate ANY comments or suggestions. Thanks in advance!

    EDIT: I found one plugin that KIND OF works, but is uber complicated, has more than what i want, and doesnt REALLY work entirely (will only place players switching into creative mode into a permissions group, but not visa-versa. (or maybe i just cant figure it out. I mean, any plugin that i have to spend 3 hours trying to configure to do something this simple, in all honesty isn't worth my time.)) This plugin is called LimitedCreative.
     
  2. Offline

    GusGold

    What permissions plugin are you using? Because I could whip up a plugin in a day or so, that when they switch gamemodes, they go from being in group "playersSurvival" to "playersCreative" and vice versa. That way, you keep on using your current permissions handler, but this plugin switches the group they are in around. Does that sound like something that you were wanting?
     
  3. Offline

    Pookie21

    I'm using PermissionsBukkit (superperms?). Yea, i think that would do the trick. GGGamemodePerms? ;)

    Just a few configuration pointers i have in mind:
    1. Make the group they switch into configurable:
      • CreativeGroup: [String]
      • SurvivalGroup: [String]
      • AdventureGroup: [String] (if you're feeling ambitious
    2. CtSBroadcast: [Boolean]
      • true= server broadcasts [CtSmessage] when players switch from Creative to Survival.
      • false= server does not broadcast any messages when players switch from Creative to Survival.
    3. CtSmessage: [String]
    4. StCBroadcast: [Booelan]
      • true= server broadcasts [StCmessage] when players switch from Survival to Creative.
      • false= serer does not broadcast any messages when players switch from Survival to Creative.
    5. StCmessage: [String]
    Thats it!
    Thanks G for taking this up. keep me informed.
     
  4. Offline

    GusGold

    That obvious eh? :3
    I will discus the configuration further when I am off my tablet. Otherwise, tomorrow morning I will be make the dev.bukkit plugin overview and we can go from there. :)
     
  5. Offline

    Pookie21

    sounds good.
     
  6. Offline

    GusGold

    http://dev.bukkit.org/server-mods/gggamemodeperms Soon to be :)

    Pookie21
    Code:
    # Commands to execute to change the player's group
    # Use player where the player's name would normally be
    toSurvivalCmd: myPermissions setGroup:Survival setPlayer:player
    toCreativeCmd: myPermissions setGroup:Creative setPlayer:player
    toAdventureCmd: myPermissions setGroup:Adventure setPlayer:player
     
    # Set broadcast message when player enters Survival, Creative or Adventure
    toSurvivalBroadcastEnable: true
    toSurvivalBroadcast: player has entered Survival mode
     
    toCreativeBroadcastEnable: true
    toCreativeBroadcast: player has entered Creative mode
     
    toAdventureBroadcastEnable: true
    toAdventureBroadcast: player has entered Adventure mode
    How does that look for a mock up?

    http://dev.bukkit.org/server-mods/gggamemodeperms/files/1-gggamemode-perms/
    Neither the project or .jar has been looked at and approved yet, but there is the file anyway.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 1, 2016
  7. Offline

    Pookie21

    that looks perfect.
     
  8. Offline

    GusGold

    Excellent :)
     
  9. Offline

    Pookie21

    Dude thanks again for making this. Good work.
     
  10. Offline

    GusGold

    No problem :)
     

Share This Page