Inactive [ADMN/DEV] Permissions 3.1.6 - The Plugin of Tomorrow [935]

Discussion in 'Inactive/Unsupported Plugins' started by rcjrrjcr, May 24, 2011.

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

    rcjrrjcr

    Permissions 3.1.6 (Yeti)

    Download:
    Latest Stable (3.1.6) : Full Zip | Main Jar Only | SQL Interface Jar Only

    Previous Versions:
    3.1.5 (JAR|SQL) | 3.1.4 (JAR|SQL) | 3.1.3 (JAR|SQL) | 3.1.2 (JAR|SQL) | 3.1.1 (JAR) | 3.1 (JAR) | More older versions


    COMMAND RESTRUCTURING
    Feel free to comment and give suggestions.


    DO NOT USE GLOBAL CONFIGS FOR NOW. THE GLOBAL CONFIG IS MEANT TO SUPPLEMENT WORLD-SPECIFIC CONFIGS, NOT THE OTHER WAY ROUND. SEE https://github.com/TheYeti/Permissions/wiki/Global-vs-World .I WILL WRITE A PROPER TUTORIAL ON HOW TO USE THE GLOBAL CONFIGS SOON.

    TODO:
    • Revamp commands
    Known plugins that cause IllegalAccessError(s):

    • Help (not fixed yet)
    Temp Fix for IAEs (open)




    1. Open Help's JAR with 7zip.
    2. Find MANIFEST.MF (it can be in the root folder or in the META-INF folder, or both).
    3. Open the MANIFEST.MF file in a text editor
    4. Look for a line that starts with "Class-Path:".
    5. Delete "Permissions.jar" from that line.
    6. Save the manifest.
    7. 7zip will prompt you to save changes back into the archive. Accept.
    8. Restart server.





    Plugin Authors: How to hook into Permissions

    Due to @TheYeti being busy in RL for now, I have created a new thread for Permissions 3.x. TheYeti is still part of the Permissions team.

    Permissions... Reborn.
    This is a continuation of the work that was originally done by Nijikokun. All original credit goes to them as without their work this plugin would not have been possible. This plugin does not provide any commands or additional functionality beyond what is described in this post. That means that you need another plugin to provide colored names, chat prefixes, and op commands such as /give and /time.​

    The Permissions Team

    The team consists of myself @rcjrrjcr and @TheYeti currently with contributions from @Nijikokun as well on occasion. There are also several other members of the community who frequently assist with providing code changes, bug fixes, patches, support, feedback, and beta testing. Special thanks to @flames and the Dynmap & Wormhole X-Treme teams for the hosting of Permissions on their Jenkins server.

    What's new in 3.x?

    Taken from the GitHub page:
    1. In-game commands. For a long time, users have been pestering, nagging, demanding and/or screaming for an way to manage Permissions via commands. Now, in 3.0, in-game commands are available to manage permissions and groups.
    2. SQL storage. This allows web interfaces to manage Permissions by updating the SQL database Permissions uses.
    3. Promotion/demotion tracks. With a simple command, users can be promoted/demoted along a preconfigured track, allowing RP servers with ranks to promote the player along a class track and other possibilities.
    4. Multigroup.
    5. Weightage. Plugins are able to compare users via their weight, which is inherited from their groups. For example, SlapPlugin can check if Player A is higher-weighted than Player B when A tries to slap B (Not IRL, obviously).
    6. Improved world mirroring. Config files are now split into a group file and a user file. Also, by editing storageconfig.yml, you can configure the mirroring of entire worlds, or just its users/groups. You also do not have to create files for worlds that mirror another world. Also, two different worlds can use different storage types, like YAML and SQL.
    7. Global permissions. Instead of having to resort to cross-world group inheritance, now all worlds inherit groups and users from the global permissions file. Also, the inherited groups/users can be overridden via editing the specific world's file.
    Upgrading from 2.x to 3.x







    I have written a guide on GitHub. This demonstrates how to convert 2.x-style configs to 3.0. The YAML-to-SQL converter are still in testing, but it can be downloaded from here. It's written in Perl. @Zgred has created a web version of the script located here. @omgneeq is working on an Web UI for SQL databases (Sorry about the previous statement that he was making a converter.)​


    Install (open)
    For the admins

    In case you missed the link above, the Setup Guide on GitHub will help you quite a bit

    Samkio has updated his tutorial for P3:


    First thing that you will need to do is download the plugin. Place it in your plugins/ folder and unzip it. This should create the folder Permissions and a Permissions.jar file in your plugins folder. Next, go into Permissions/ and create a folder named the same as your world. So if your world name from server.properties is Foo you will need to create the folder plugins/Permissions/Foo. You MUST rename it to whatever your world's name is or it will not work.

    Note, if you have your server maps all saved into a single directory then the initial setup will be somewhat different. Say your maps are arranged in the main directory like so: bukkit/mapfolder/world1, bukkit/mapfolder/world2, etc. Then inside of the plugin/Permissions directory you will need to create a folder called mapfolder and inside of that put the directories containing users.yml and groups.yml in there.

    Next, you will need to go in and add yourself to the users, just replace the user that is in there with your name. Make any other modifications that you need to. While making modifications make sure that you do NOT use tabs. These will break the YAML format and cause issues. Instead, each indent should be four spaces. If you want people who aren't in the Admin group to be able to reload the permissions plugin you need to give them 'permissions.reload' permissions within the config file.

    Permissions gives server admins great control, mostly in-game reloading. More info about commands can be found here.


    FAQ (open)

    [FAQ]

    [Q] What is with the version numbers? I can't keep up, it seems like every time I look there is a new version!
    [A] I use the GNU versioning system for my version numbers. So what this means is the version number should be read as Major.Minor.Revision. So for version 2.5.2 this would mean it is the 2nd Major version, the 5th Minor release in this version, and the 2nd revision. I tend to release bug fixes and anything that doesn't add functionality or will not break things as revisions. So generally you should be safe with just watching the major & minor numbers and only getting the revision if it fixes a bug specific to you. Technically 2.5.2 should have been released as 2.6 as it did add functionality, but this was below even a minor change so I released it as a revision.

    [Q] I am getting an error that it can't pass BLOCK_PLACED or BLOCK _BREAK events to Permissions. Fix it!
    [A] That's not a question. The reason why it can't place these is probably because the syntax of your Permissions file is all whacked out, or it is a different world and you don't have a config file for that world.

    [Q] What am I suppose to name the config file?
    [A] You need to name it the same as your world. So if you look in server.properties at "level-name" you will see a world name there. Rename your config file to the same thing as that. Make sure you keep the .yml extension at the end.

    [Q] Permissions are broken. Why can no one use commands? Why am I not an admin?
    [A] First off, make sure that your formatting is correct. Look at the format that the default config file uses. Yours should look like that. Do NOT use tabs. Use 4 spaces (IE. " " <-- Four of those things.). Also, whichever group you give the permission '*' to, do not have that group inherit permissions from anyone else. That is called overloading and it will break things. Also, this.


    [Q] Which one am I suppose to download and unzip to install this?
    [A] Download the main package, not the JAR only. Unzip the ZIP file. The JAR only downloads are simply there for people who are UPGRADING and do not need the default config file.

    [Q] I have done all of this and this doesn't work! I'm going back to GroupManager!
    [A] Well, there is probably the problem. Make sure that you delete EssentialsGroupManager.jar and EssentialsGroupBridge.jar as these don't play well with Permissions and will cause headache.

    [Q] When are you going to add <blah> <feature/command> into this already? You suck! Do what I want NAU PL0X!
    [A] Feature requests should be posted on the GitHub tracker. Stupid suggestions like adding teleportation functionality and other less ludicrous stuff will be rejected.



    Changelog
    • 3.1.6
      • Major fixes.
      • Simplify tracks
    Changelog (open)





    • 3.1.5
      • Fix several minor bugs.
      • Autoconvert 2.x/GM format (only works if you split them into groups.yml and users.yml, but leave the rest untouched)
    • 3.1.4
      • Fix YAML locking bugs.
    • 3.1.3
      • Fix another SQL data and inheritance issue.
    • 3.1.2
      • Fix SQL data issues.
      • Added user/group name autocomplete
      • Separated SQL interface into separate plugin
    • 3.1.1
      • Fix prefix/suffix issues.
      • Added ON UPDATE CASCADE to the SQL foreign [/SIZE]
    • 3.1
      • Tons of fixes.
    • 3.0.6
      • Fix SQLite issues due to misimplementation of methods.
    • 3.0.5
      • Fix cache-related NPEs
      • Fixed quoted worlds (thanks again @Jeyge !)
    • 3.0.4
      • Fix LinkageError caused by ServiceManager not unloading the PermissionHandler class.
      • Added cache
      • Fix index not being incremented when promoting (thanks @Jeyge !)
    • 3.0.3
      • Fixed another getGroup bug.
    • 3.0.2
      • Fixed getGroup bug.
    • 3.0.1
      • Fixed some NPE bugs.
    • 3.0
      • Total overhaul of Permissions. Adds many new features (see What's new in 3.0?).
    • 2.7.4
      • Added overload of has() and permissions() for plugin devs
    • 2.7.3
      • Fixed negate node add/remove bug.
    • 2.7.2
      • Fix for small subtle bug introduced in last minor version.
    • 2.7.1
      • Commit by DThielke to fix several bugs with programmatic modifications of user permissions.
    • 2.7
      • Further commits by rcjrrjcr
        • Removed negatedNode checks
        • Temp fix for NULL issue
        • WorldConfigurationModification to save only modified configs
        • Fix for cache problems








    Credits (open)


    TheYeti:
    Nijikokun - Without their original work this plugin would not be possible.​
    All of the members of the community that regularly provide support in this thread for Permissions​
    Rigby, Kainzo, DThielke, GoMySQL, sk89q, RightLegRed - For hanging out with me in IRC, tons of testing, and pushing me to improve on the code constantly and make changes to make this plugin constantly better and better, and in general being entertaining.​
    Everyone else on here and in IRC who provides support, feedback, assistance, plugins that have continued to support and integrate this, and in general makes my life a bit easier, THANK YOU!​

    rcjrrjcr:
    I would like to thank Joy , jamesg and omgneeq for staying in #permissions for long periods of time to test out 3.0, and help me find many coding mistakes I made, patiently waiting for the next build while I fixed the bugs. I appreciate SvenBrnn 's and GoMySQL(Geoff Winans on this forum) 's help that allow me to design and code the SQL interface, and the HeroCraft coding team for providing support and some priceless IRC quotes (Dgco). Also, I would like to thank Lycano for helping me in many different aspects. Last but not least, I would like to thank Nijikokun and TheYeti for developing P2, which was one of my core plugins when I was still a 14-year-old server admin that didn't understand Java, and was the base for 3.0. Without these people, 3.0 would never be possible.​


    If after reading through all of that you are still having issues do one of two things. If it is a provable bug, and you have things like screenshots or copies of startup, steps to reproduce, your craftbukkit build and the version this is running along with your config files then submit the bug on the issue tracker. If it is general help or support you are needing then post a reply to this thread and someone will try to help you.

    Old thread: Permissions v2.7.4
     
  2. Offline

    dark_hunter

    Use this I sported that before the nodes there was tab spaces.
    http://dl.dropbox.com/u/5392483/yourworldname.yml
     
  3. Offline

    Tobbi

  4. Offline

    Rob Casey

    Have a few questions. First of all do the prefix and suffix work yet with herochat? Secondly and most importantly when new players join my server they cannot build until I add their name to the globalUsers.yml file under the default gobalUser group. I have the default group default: set to true as well as build: set to true but it makes no difference. When a new player joins who hasn't been on my server yet joins, he cannot build and doesn't even have the permissions in the default group.

    As soon as I add an entry into gobalUsers.yml for them and make them a member of default group they can build and have the correct permissions but unless I do this they have nothing.
     
  5. Offline

    Ranzear

    I'm currently right back in the Permissions hell I was in when plugin devs couldn't decide between 2.0 and 3.0 and GroupManager. Now the problem is that SuperPermsBridge doesn't work quite as advertised (partly because it was telling plugins that it was 2.0 permissions but had 3.0 calls) to help with those 3.0 supporting plugins that haven't move to SuperPerms yet.
     
  6. Offline

    Rob Casey

    ANYONE?????
     
  7. Offline

    DaveK

    Hi, i have following problem..simple.. i cant built but i got admin permissions.

    Server.log
    Code:
    2011-08-21 19:38:49 [INFO] Starting minecraft server version Beta 1.7.3
    2011-08-21 19:38:49 [INFO] Loading properties
    2011-08-21 19:38:49 [INFO] Starting Minecraft server on *:25565
    2011-08-21 19:38:49 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-980-g4ed23b1-b1060jnks (MC: 1.7.3)
    2011-08-21 19:38:49 [INFO] [Permissions] (Yeti) was initialized.
    2011-08-21 19:38:49 [INFO] [Permissions] version [3.1.6] (Yeti) loaded
    2011-08-21 19:38:49 [INFO] Preparing level "world"
    2011-08-21 19:38:49 [INFO] Preparing start region for level 0 (Seed: -8507432511521578612)
    2011-08-21 19:38:50 [INFO] Preparing spawn area: 69%
    2011-08-21 19:38:51 [INFO] Preparing start region for level 1 (Seed: -8507432511521578612)
    2011-08-21 19:38:51 [INFO] Preparing spawn area: 69%
    2011-08-21 19:38:52 [INFO] CraftBukkitUpToDate version 2.6.1 is enabled!
    2011-08-21 19:38:52 [INFO] Server permissions file permissions.yml is empty, ignoring it
    2011-08-21 19:38:52 [INFO] Done (0.260s)! For help, type "help" or "?"
    2011-08-21 19:38:53 [INFO] CButD: CraftBukkit is up to Date
    2011-08-21 19:39:02 [INFO] The automatic update-Check only work every 6 hours, the last check was 82 minutes ago.
    2011-08-21 19:39:06 [INFO] Stopping the server..
    2011-08-21 19:39:06 [INFO] Stopping server
    2011-08-21 19:39:06 [INFO] [Permissions] (Yeti) saving data...
    2011-08-21 19:39:06 [INFO] [Permissions] (Yeti) saved all data.
    2011-08-21 19:39:06 [INFO] [Permissions] (Yeti) disabled successfully.
    2011-08-21 19:39:06 [INFO] Saving chunks
    2011-08-21 19:39:06 [INFO] Stopping server
    Groups.yml
    Code:
    groups:
        Default:
            default: true
            info:
                prefix: ''
                suffix: ''
                build: false
            inheritance:
        Admins:
            default: false
            info:
                prefix: ''
                suffix: ''
                build: true
            inheritance:
            permissions:
                - '*'
    Users.yml
    Code:
    users:
       myName:
            groups:
            - Admins
            permissions:
    i have no other plugins installed. So where is my problem. I had it run before and a plugin stuffed up my bukkit so i have to do it from scratch again.. :( Yes i learned -> backups are a god thing.. i know.. to late for now.

    i am such a noob..i was in the spawn area when i tryed to destroy and build blocks.. working fine again ... rofl

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Sep 9, 2018
  8. Offline

    efstajas

    Yeah, the bridge is really strange... I've heard that opening the jar with an unzipper and then changing the version in plugin.yml from 2.x tp 3.1.6 helps. Maybe you could try that. Or you just look into PermissionsEx, I'll also do that. :)
     
  9. Offline

    isikerkan

    Inactive? Why Inactive its have a new Permissions?
     
  10. Offline

    efstajas

    Seems like they let it die. You should switch to a permissions plugin with Superperms (the official Bukkit Permissions API). I recommend PermissionsEx. :)
     
  11. Offline

    isikerkan

    I think thats the Best !! Permissions i ever seen and the others are really Shit i think -.-
     
  12. Offline

    RugRats

    Someone continue it please!
     
  13. Offline

    vDepth

    Spent my time today converting over from Premission 3.1.6 to PermissionsEx.

    Took a bit of work putting it all into a single file and such but PermissionsEx did not disappoint. Players on my server wouldn't have even noticed the change if I did not tell them about it.

    Also all the ingame commands for changing the permissions files built into it work a treat (no need for a third party plugin).
     
  14. Offline

    dark_hunter

    Did the nodes work that have "*" in them?
     
  15. Offline

    25CentStudios

    So I am running Perms 3.1.6, and its now inactive, what is my best course of action? PermissionsEx, (If yes, how would I migrate from Permissions 3.1.6 (Read article about moving both Ymls into one, but how would i do that) or some other plugin?
     
  16. Offline

    khamseen_air

    I was playing around with permissions ex earlier and it was actually incredibly simple to convert over. Open up users.yml and groups.yml from this plugin. Copy all of the users.yml and paste it at the end of the groups listing in groups.yml (make sure not to leave any spaces between them). Then save the new file as <worldname>.yml and put it in the plugins/permissions/ directory. Remove this plugin and upload the permissionsEX plugin, run the server and in the console type the following;
    Code:
    pex backend p2compat
    pex dump file permissions.yml
    pex backend file
    To make sure it all worked type 'pex hierarchy' in the console and you're good to go.
     
  17. Offline

    Flaminglynx

    Hi sorry if this is a repeated question, but my problem isn't that the commands arent working.. its that they are. all the commands. for every group. I set it so the permission nodes for the plugin admincmd is under admin group only. but it seems that everyone in the server no matter what group they are in, can use the commands. what is the problem here? What information do you need to figure out what happened?
     
  18. Offline

    khamseen_air

    A copy of your users.yml and groups.yml file would be handy. :)

    Well for instance in my setup, our Permissions 3.7.1 uses '*' for admins, but also we remove three specific things that we don't want to use;
    admincmd.player.clear (clears the inventory)
    admincmd.player.clear.other (clears another players inventory)
    ud.drop.boat (because we have two plugins which affect boat drops, we remove this to stop us picking up two boats)

    But to use 'superpermbridge.*' to give the equivalent of '*' we can't seem to remove permissions as the other node appears to override any removed permissions, meaning I'd have to go through all our plugins and list each one of their permission nodes we need. The original system was much more intuitive and easy to set up, the permissionsbukkit with additional superpermbridge plugin is just so much more awkward than it needs to be.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Sep 9, 2018
  19. Offline

    Musaddict

    Damn, another core plugin out for the count...
     
  20. Offline

    khamseen_air

    I know, it's a pain isn't it! I wouldn't mind if the PermissionsBukkit wasn't so inferior to what we had with these plugins.
     
  21. Offline

    Flaminglynx

    Here is group and users, i put them into txt files bc upload a file wouldent see the .yml's
     

    Attached Files:

  22. Offline

    khamseen_air

    OK, few points. Your 'Citizen' group, inherits from 'Stranger', which it doesn't really need because 'Stranger' has no permissions.
    Between each group, you have a line break (a gap), remove those as there shouldn't be any gaps like that.
    Example (open)

    It should be like this;
    Code:
    groups:
        Stranger:
            default: true
            permissions:
            inheritance: []
            info:
                prefix: '&f'
                build: false
                suffix: ''
        Citizen:
            default: false
            permissions:
            - -admincmd.player.invisible
            - -admincmd.player.invisible.other
            - -setrank.rankall
            - -admincmd.item.add
            - admincmd.player.afk

    You don't need to add the -admincmd.whatever to the 'Citizen' group as they don't have that permission to remove anyway. I'm guessing you've maybe done that to try and troubleshoot your problem.
    The 'Admin' group, doesn't need all the listed permissions since you've already put '*' in their permissions, meaning they have access to all permissions available anyway. You only need to list permissions you wish to remove from the 'Admin' group in there.

    Your users file is fine, it's probably the spacing in the groups.yml file which is causing it to not actually read the permissions correctly if at all.
     
  23. Offline

    NinjaZidane

    I don't understand why you guys are having issues with the bridge....

    I know this isn't truly the place for it but if you could tell me the exact plugin you are having issues with the bridge with then maybe I could provide the solution :)

    I see....can you give me the exact plugin(s) that provides those nodes above? I can test and see if I can get the ability to remove their use from the bridge :)

    ....or better yet a plugin list and your users and groups.yml

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 10, 2018
  24. Offline

    khamseen_air

    AdminCmd for the first two and UndroppableDroppables for the boat one.

    Show Spoiler

    This is my permissionsbukkit config.yml file if you could check to make sure I'm not doing it wrong.
    Code:
    users:
        khamseen_air:
            permissions:
                admincmd.player.clear: false
                admincmd.player.clear.other: false
                ud.drop.boat: false
            groups:
            - admins
    groups:
        default:
            permissions:
                myhome.home.basic.*: true
                myhome.home.soc.*: true
                mywarp.warp.basic.*: true
                mywarp.warp.sign.*: true
                mywarp.warp.soc.*: true
                fishpeople.infiniteair: true
                fishpeople.cantalkunderwater: true
                fishpeople.invinciblehelmet: true
                lockette.create.*: true
                falsebook.cart.*: true
                falsebook.blocks.gate: true
                falsebook.blocks.destroy: true
                falsebook.blocks.hiddenswitch.create: true
                falsebook.blocks.lightswitch.create: true
                falsebook.blocks.lightswitch.use: true
                falsebook.blocks.readbooks: true
                admincmd.time.day: true
                admincmd.weather.clear: true
                admincmd.weather.storm: true
                admincmd.spawn.tp: true
                ud.drop.bookcase: true
                ud.drop.cobblestonestairs: true
                ud.drop.woodenstairs: true
                ud.drop.glowstone: true
                ud.drop.glass: true
        trusted:
            permissions:
                falsebook.anyic: true
                admincmd.tp.to: true
            inheritance:
            - default
        admins:
            permissions:
                permissions.*: true
                superpermbridge.*: true
                craftbukkit.command.time: true
    messages:
        build: '&cYou do not have permission to build here.'
    Playing with it on a local test server so it's only me in the user list.
     
  25. Offline

    NinjaZidane

    I see the issue and it isn't your fault...

    Here is what is happening:

    AdminCMD has support for SuperPerms, Permissions, and PermissionsEX. In your setup above, it seems that PermissionsBukkit permissions get applied to your users on server bootup and THEN SuperPermsBridge gets applied of its permissions.

    The permissions are being overwrite'd. Now I can think of three ways to fix this:

    1. Do a check on all your plugins and see if any use the bridge. If any do, contact the dev and request true SuperPerm support. When they do, remove the bridge for good (as bridge's are terrible) -> Optimal Solution

    2. Ask the dev of PermissionsBukkit to make SuperPermBridge to have lower priority than PermissionsBukkit. This is just a theory of mine but I THINK that this will handle issues like these.

    3. Somehow put a - Permission (just like you did for Permissions 3.x to remove one) but do it with the bridge after SuperPermBridge.*. Never did this before but its a possibility.

    Hope I helped.

    --Zidane
     
  26. Offline

    Ranzear

    I'm the one who noticed that and posted it to the PermsBukkit thread, or at the very least found it on my own if it was known prior...
     
  27. Offline

    NinjaZidane

    Thats more than likely because some plugins are checking the permissions version in their code and throwing an error if the permission version is to low (i.e. code wise a bridge appears to other plugins as no different than the true Permissions 2.7/3.x series).
     
  28. Offline

    Ranzear

    Yeah that's exactly what I was aware of, or they were detecting 2.0 permissions and using those calls instead of the 3.0 permissions SuperPermsBridge is supposed to emulate.
     
  29. Here is a small script which prints out the permissions of the database.

    Quick and dirty

    The Pics for the Output View attachment 6099 View attachment 6100 View attachment 6101

    PHP:
    <?php

    header
    ("Content-Type: text/html; charset=UTF-8");
    error_reporting("E_ALL");
    ?>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
          $(".expand").click(function() {
            $(this).toggleClass("expanded");
            $(this).next().slideToggle("300");
          });
        });
    </script>
    <style type="text/css">
        body, html{
          height: 100%;
          width: 100%;
          font-family: "Trebuchet MS";
          margin: 0; padding: 0;
        }

        a {
          text-decoration:none;
          color: black;
        }

        ul, li {
          list-style: none;
        }

        #nav li {
          padding: 2px 2px 2px 15px;
          cursor: default;
        }

        #nav ul {
          background: url(dots.png) repeat-y scroll 10px 0 transparent;
        }

        #nav li.expand {
          background: url(arrow-down.gif) no-repeat scroll 0px 12px transparent;
        }

        .expanded {
          background: url(arrow-up.gif) no-repeat scroll 0px 12px transparent !important;
        }
    </style>
    <?

    $mysqli 
    mysqli_init();
    if (!
    $mysqli)
        die(
    'mysqli_init failed');
    if (!
    $mysqli->options(MYSQLI_OPT_CONNECT_TIMEOUT5))
        die(
    'Setting MYSQLI_OPT_CONNECT_TIMEOUT failed');
    // CONFIG!
    if (!$mysqli->real_connect('localhost''USER''PASS''DBNAME'))
    // CONFIG!
    {
        die(
    'Connect Error (' mysqli_connect_errno() . ') '
            
    mysqli_connect_error());
    }
    if (!
    $mysqli->set_charset("utf8"))
        
    printf("Error loading character set utf8: %s\n"$mysqli->error);
    $query "    SELECT * FROM `PrWorlds`
            LEFT JOIN `PrWorldBase` USING (`worldid`)"
    ;
    if ((
    $result $mysqli->query($query)))
    {
        while (
    $obj $result->fetch_array(MYSQLI_ASSOC))
        {
          
    $array[] = $obj;
        }
        
    $result->close();
    }
    echo 
    "<ul id=\"nav\">";
    foreach (
    $array as $world)
    {
        
    // Welten
        
    echo "<li class=\"expand\">World: $world[worldname]<li><ul>\n";
        
    $query "  SELECT *
                FROM  `PrEntries`
                WHERE  `PrEntries`.`worldid` = 
    $world[worldid] AND `PrEntries`.`type` = 1 ";
        if ((
    $result $mysqli->query($query)))
        {
          while (
    $obj $result->fetch_array(MYSQLI_ASSOC))
          {
            
    $groups[] = $obj;
          }
          
    $result->close();
        }
        
    // Die Gruppen innerhalb der Welten
        
    foreach ($groups as $group)
        {
          if (
    $group['entryid'] == $world['defaultid'])
          {
            echo 
    "<li class=\"expand\">Gruppe: <strong>$group[name]</strong></li><ul>\n";
          }
          else
          {
            echo 
    "<li class=\"expand\">Gruppe: $group[name]</li><ul>\n";
          }
          
    // Rechte von den Gruppen innerhalb der Welt
          
    $query "  SELECT *
                  FROM  `PrData`
                  WHERE  `entryid` = 
    $group[entryid]";
          if ((
    $result $mysqli->query($query)))
          {
            while (
    $obj $result->fetch_array(MYSQLI_ASSOC))
            {
                
    $group_data_rights[] = $obj;
            }
            
    $result->close();
          }
          if (
    $group_data_rights)
          {
            echo 
    "<li class=\"expand\">Rechte:</li><ul>\n";
            foreach (
    $group_data_rights as $group_data_right)
            {
                echo 
    "<li>$group_data_right[path] : $group_data_right[data]</li>\n";
            }
            echo 
    "</ul>\n";
          }
          
    $query "  SELECT *
                  FROM  `PrPermissions`
                  WHERE  `entryid` = 
    $group[entryid]";
          if ((
    $result $mysqli->query($query)))
          {
            while (
    $obj $result->fetch_array(MYSQLI_ASSOC))
            {
                
    $group_data_perms[] = $obj;
            }
            
    $result->close();
          }
          if (
    $group_data_perms)
          {
            echo 
    "<li class=\"expand\">Permissions:</li><ul>\n";
            foreach (
    $group_data_perms as $group_data_perm)
            {
                echo 
    "<li>$group_data_perm[permstring]</li>\n";
            }
            echo 
    "</ul>\n";
          }
          
    // User die dieser Gruppe angehören
          
    $query "  SELECT *
                  FROM  `PrInheritance` pi
                  LEFT JOIN  `PrEntries` pe ON ( pi.childid = pe.entryid )
                  WHERE  `parentid` = 
    $group[entryid]";
          if ((
    $result $mysqli->query($query)))
          {
            while (
    $obj $result->fetch_array(MYSQLI_ASSOC))
            {
                
    $users[] = $obj;
            }
            
    $result->close();
          }
          if (
    $users)
          {
            echo 
    "<li class=\"expand\">Users:</li><ul>\n";
            foreach (
    $users as $user)
            {
                echo 
    "<li>$user[name]</li>\n";
                
    $query "  SELECT *
                    FROM  `PrData`
                    WHERE  `entryid` = 
    $user[entryid]";
                if ((
    $result $mysqli->query($query)))
                {
                  while (
    $obj $result->fetch_array(MYSQLI_ASSOC))
                  {
                    
    $user_data_rights[] = $obj;
                  }
                  
    $result->close();
                }
                if (
    $user_data_rights)
                {
                  echo 
    "<li class=\"expand\">Rechte:</li><ul>\n";
                  foreach (
    $user_data_rights as $user_data_right)
                  {
                    echo 
    "<li>$user_data_right[path] : $user_data_right[data]</li>\n";
                  }
                  echo 
    "</ul>\n";
                }
                
    $query "  SELECT *
                    FROM  `PrPermissions`
                    WHERE  `entryid` = 
    $user[entryid]";
                if ((
    $result $mysqli->query($query)))
                {
                  while (
    $obj $result->fetch_array(MYSQLI_ASSOC))
                  {
                    
    $user_data_perms[] = $obj;
                  }
                  
    $result->close();
                }
                if (
    $user_data_perms)
                {
                  echo 
    "<li class=\"expand\">Permissions:</li><ul>\n";
                  foreach (
    $user_data_perms as $user_data_perm)
                  {
                    echo 
    "<li>$user_data_perm[permstring]</li>\n";
                  }
                  echo 
    "</ul>\n";
                }
                
    // Unset und Close // User Ende
                
    unset($user_data_perms);
                unset(
    $user_data_right);
            }
            echo 
    "</ul>\n";
          }
          
    // Unset und Close // Groupen Ende
          
    echo "</ul>\n";
          unset(
    $users);
          unset(
    $group_data_rights);
          unset(
    $group_data_perms);
        }
        
    // Unset und Close // welten Ende
        
    echo "</ul>\n";
        unset(
    $groups);
    }
    echo 
    "</ul>";
    ?>
     
  30. Offline

    khamseen_air

    Thanks for your help. I'm glad it's not something I was doing wrong, I've being going a bit mad trying to figure it out as I'd really like to make the switch to PermissionsBukkit before Permissions 3 stops working lol. I shall look into your suggestions and let you know how I get on. :)

    Yes, that would provide that group with every permission, except the ones listed. :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 2, 2019
  31. Offline

    Jamyy10

    BUMP
     
Thread Status:
Not open for further replies.

Share This Page