Permissions FAQ

Discussion in 'Plugin Development' started by Dinnerbone, Jul 7, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    tyzoid

    hmmmm....

    I must have been doing the wrong thing correctly :p
     
  2. Is there a way to add and remove Permissions from an user inside the Permissions API?
    So lets say I have one user who is Guest and when I type a command I want him to be removed from the "blabla.isGuest: true" Permissions and added to "blabla.isMember: true" Permission.
     
  3. Offline

    zaph34r

    from what i gather you would be using the interface described here directly on the player, so by changing an attachment or adding a new one it should be fairly trivial to do :)
     
  4. this is the role of a permissions plugin. The only purpose of adding permissions via the API is:

    - Achieve cool Defaults (OP, NOT_OP, TRUE, FALSE)
    - Achieve nifty nesting

    When you add a permission, you're just telling the Bukkit server that a permission now exists, but you don't tell it what to do with it. You can remove it entirely, but that removes it globally.
     
  5. Offline

    gerarddude5100

    i want to be able to not let people build as the default group but let them be able to use objects like doors, chests

    Is there a way
     
  6. Offline

    Mr_Fishy

    THIS MAKES NO FUCKING SENSE WILL SOME ONE TEACH ME HOW TO USE THIS AND THE OTHER PERMISSIONS LINK AAHHHHHHHHHHHHHHHHHHHHHHH
    THIS IS SO MUCH MORE COMPLICATED THEN THE REGULAR PLUGIN
     
    cholo71796 and WertyRules like this.
  7. Offline

    Celtic Minstrel

  8. Offline

    javaguy78

    I thought I had this working, but I guess I don't.. I have the config.yml file configured, default is shown here:

    Code:
        default:
            permissions:
                permissions.build: false
                commandbook.who: true
                commandbook.motd: true
                commandbook.rules: true
                commandbook.time.check: true
                commandbook.spawn: true
                commandbook.say.me: true
                commandbook.whereami.*: true
    I suppose that this should give everyone who logs into my server certain permissions, but when I logged in and tried "/rules" I get "you don't have permissions".

    It's like permissions can't see the other plugins. For instance, I have supplysign installed and users with supplysign.access, but when I click on a protected chest, I get an error saying I don't have permissions, even though I set them up in config.yml. Is there a setting somewhere I am missing that won't let the other plugins work with this plugin?
     
  9. Offline

    zaph34r

    @javaguy78
    does commandbook even support the new permission system? if not, do you have the bridge plugin installed that enables compatibility with plugins that use P2/3 style permissions?
     
  10. Offline

    javaguy78

    @zaph34r Doh, I knew I forgot to read something... thank you. (I feel stoopit)

    One last question. Is there a way to give people who just logged into a server (not in a user group) certain permissions?

    for instance, I wanna give everyone, regardless of permissions, access to send themselves back to the spawn.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  11. Offline

    xZise

    This has to be handled by the plugin which sends the player back to the spawn. This here manages only the permissions values.

    Fabian
     
  12. Offline

    zaph34r

    but the server can very much give permissions to people not in a group (as was asked) via the permissions.yml right?

    @javaguy78
    if some plugin has the functionality to do what you want, and has a permission for it (say for example 'pluginname.spawn'), then you would just put
    Code:
    pluginname.spawn:
      default: true
    in your permissions.yml (in your server root directory), then every user has that permission by default, without any need to specify it in your permission manager plugin, or need for a permission manager plugin at all
     
    javaguy78 likes this.
  13. Offline

    xZise

    Yep. But you need some plugin which asks if a user has a permission. And I don't understand what you try to do. Do you want to give a user a permission for a period of time after the login?

    I guess, this should be handled by the bukkit permissions plugin you use. This then should emulate for a period of time after login, that the user has the permission. I don't think that this should be implemented by SuperPerms.

    Fabian
     
  14. Offline

    zaph34r

    the way i understood it he just wants to give users that are not entered in any group (in the config of some permission manager plugin) yet a certain permission, which is exactly what the permission.yml defaults are for i would say. If it was timed, it would of course need some plugin that has functionality to add permissions with a timeout, but that would still be using superperms.
     
  15. Offline

    Celtic Minstrel

    @javaguy78 – Questions like those ones you asked about setting up groups probably belong in the PermissionsBukkit thread; this thread is more for developer questions or questions about the permissions.yml. And there's no such thing as a player who's not in a group; if you haven't set a group for them, they'll be in group default, so just give that group the permissions.

    @zaph34r – I think for your permissions.yml example you might need to invent your own permission with the desired permission as a child, at least if the plugin registered the permission.
     
  16. Offline

    zaph34r

    so it's not possible to both have a plugin register a permission in the plugin.yml, and the server admin entering a default thats not nested as a child of another new permission for it in the permissions.yml ? in that case i guess i have to rethink a few things in my plugin
     
  17. Offline

    ToastedJelly

  18. Offline

    Sir_Speshkitty

    Is there a simple way to get permissions of offline people with this permission system?
     
  19. Offline

    Sleaker

    Not without storing the player object from when they were online, or hooking into a persistence engine to pull a stored permission...
     
  20. Offline

    javaguy78

    @zaph34r thanks, I'll give the permissions.yml file a try.

    @Celtic Minstrel you mentioned that "there's no such thing as a player who's not in a group." If this is so, what is the group a player is assigned to when logging into a server the very first time? (I'm not being facetious, I really need to know what rights brand new players automatically inherit)

    To clear up confusion, I want to give all players certain permissions, even players who haven't logged into my server yet. I want all players to have rights to certain commands immediately when they log into my server for the very first time without me having to add them to a group via "permissions player setgroup <player> <group>"
     
  21. Offline

    Moe041991

    I have a question.
    Does the new implemented permissions mean, that permission 2.7.4 is not workin anymore?
    Can i just ignore the new inbuild permission, cause i like the old plugin.
     
  22. Offline

    Drakia

    Old perm plugins work fine and you are more than able to just ignore the built in permissions
     
  23. Offline

    WertyRules

    Honestly, how hard is it to put up a really simple guide on how to convert your old permissions into this new system? It's pretty inflated of you to just create in internalized permissions system and then be as user unfriendly as humanly possible with it as you can be. You know 99% of the people using this now are coming from the old permissions plugin and yet you just try to act like it doesn't exist?
     
  24. Offline

    ToastedJelly

    Actually you didn't seem to bother to use the information that's already out there, which I find very rude.
    And this attitude shows in all the posts you made.
    Good luck getting help...
     
  25. Offline

    rmb938

    any way to add a player to a group via code?
     
  26. Offline

    Celtic Minstrel

    I'm not certain, but I would guess that permissions.yml cannot redefine registered permissions. I don't see that as an issue though; all you'd need to do is define a permission such as "defaultoverride.permissionnode" with the already registered permission as its only child and the default set to whatever.

    Um, I said that in my post (note that I'm assuming you're using PermissionsBukkit by SpaceManiac):

    There's no conversion to do. You can't convert your existing permissions to this. What you can do is convert your existing permissions to PermissionsBukkit, which makes use of this and provides several tools to convert from other systems. That said, there's no need to convert at all; conversion is really the responsibility of your permissions plugin, not of the server administrator (the only exception is if you don't have a permissions plugin),
     
  27. Offline

    Ziden

    I couldnt figure out how to add a new permission inside a plugin with this. Couldnt figure out how to consist a permission for a player, following the object Permission.

    Something like new Permission(Player p, String perm) ? Couldnt figure out how to do this =(

    couldnt instance the class to do getPluginManager().addPermission(Permission p). Any help ?

    Thanx for any answers.
     
  28. Offline

    xxdilbertxx

    .
     
  29. Offline

    Celtic Minstrel

    @Ziden – Permissions don't have an associated player. To make a new permission you do new Permission(name, description, default, children); all but the first argument are optional. (Did I get the last two flipped around?)
     
  30. Offline

    Ziden

    How can i add a permission to a player then ? Couldnt figure that out lol
     
Thread Status:
Not open for further replies.

Share This Page