Discussion in 'WIP and Development Status' started by Apocalypsies, Jun 10, 2014.

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


    GSON-Permissions is a very small permissions plugin,​
    why implements the use of GSON-2.2.4 library, along with it's extras​
    which are provided on their google SVN checkout.​
    I think I know people are going to be like: "There's already a permissions plugin using GSON",​
    or they will say: "Why gson? Gson is incredibly too long to use!".​
    The reason I am doing this atm, is because I already know a lot of Java,​
    but I am looking into learning new things like the use of bukkit, or the use of gson.​
    I currently have been using gson to a great start.. It may have a lot of stuff that you must​
    write for each permission, but it gives users, a bunch of accessibility, so they may​
    make everything how they want it done.​
    At the moment I don't implement the use of the star operator (*) to set all permissions​
    in a permissions container, but I might add that if it doesn't cause a bunch of problems.​
    I also do not have the ability to remove certain permissions, but I'll have that soon enough.​
    I haven't tested if the permissions actually get set correctly, but for the most part I have​
    the ability to write permissions to the file, and the ability to read from the file.​
    The accessibility is quite long but it's efficient enough for me. Also when a player joins,​
    and the file doesn't exist, the file gets created, and a new permissions container is created​
    for the file and puts in an example for the player.​
    Currently I need to removed the UUID container, but that will be easy.​
    Here is how the "" (permissions configuration file) looks currently:​
    { <- This opens the document.
      "permissions": { <- This acts like an array, but is actually an object that is a HashMap.
        "600a6113-e739-43cc-b37c-b1b6f9881db2": [
            "name": "bukkit.command.op.give",
            "children": {},
            "defaultValue": "FALSE",
            "description": ""
            "name": "bukkit.command.op.take",
            "children": {},
            "defaultValue": "FALSE",
            "description": ""
        ], <- comma separates arrays and objects from one another.
        "Put another person's UUID here!": [ <- This opens an array of permissions for the player's UUID.
          { <- That opens a single Permission Object for that player's UUID.
            "name": "op", <- This "names" the permission "op", similar to "bukkit.command.op".
            "children": {}, <- This is the permission children, I believe this has the permissions after the "bukkit.".
            "defaultValue": "FALSE", <- This is the value of the permission, it can either be "FALSE', or "TRUE".
            "description": "" <- This describes the permission in some way, but I don't know the use yet.
          } <- This closes the Permission written with the "{".
        ] <- This closes the permissions array for the specific player's UUID.
      } <- This one closes the HashMap: "permissions".
    } <- This one closes the .gs document.
    Overall, I think this will be a fun project, and very educational for me at the same time.​
Thread Status:
Not open for further replies.

Share This Page