[SUBMITTED] BananaPermissions - a permission system that is bananatastic! PreRelease! iChat! [860]

Discussion in 'WIP and Development Status' started by codename_B, Jun 21, 2011.

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

    codename_B

    With the advent of Permissions 3 - it was decided that a new breed of permissions plugin was needed - one which works!

    I present BananaPermissions!!!

    Code:
    name: BananaPermissions
    version: 0.0.3
    author: codename_B
    website: http://ubempire.com/
    main: com.ubempire.permissions.Permissions
    commands:
      setgroup:
        description: changes a players group
        usage: |
          /<command> playername group
      creategroup:
        description: creates a group
        usage: |
          /<command> groupname
      clonegroup:
        description: clones one groups into another
        usage: |
          /<command> groupname groupname
      listnodes:
        description: lists the nodes owned by a group
        usage: |
          /<command> group
      tagset:
        description: sets your tag or the tag of the specified player
        usage: |
          /<command> tag name
      setcolor:
        description: sets the color for a group
        usage: |
          /<command> group int(color)
      addnode:
        description: adds a node to a group
        usage: |
          /<command> group node
      removenode:
        description: removes a node from a group
        usage: |
          /<command> group node
    
    How to use the API?

    Download Link: http://tetragaming.com/codename_B/dev/BananaPermissions.jar
    Permissions Bridge by @matter123 : http://tetragaming.com/codename_B/dev/BananaPermissionsBridge.jar
    Example Plugin: http://tetragaming.com/codename_B/dev/BananaChat.jar

    import com.ubempire.permissions.PermissionHandler;
    http://tetragaming.com/codename_B/dev/BananaPermissions/

    Working on keeping things as super simple as possible - basically if you want to have all permissions just /addnode groupname *

    Another thing that used to annoy me was setting up special "clan groups" for people, well now if people have the permission node com.ubempire.permissions.tag they can easily set their own tag.

    This plugin (obviously) uses its own permissions system, so in order to use the commands you will need to be the console, have the permission node * or have the permission node com.ubempire.permissions.admin

    AntiBuild is automatic - to allow a group to build you need to add the node com.ubempire.permissions.build
    This will also prevent players without the permission node from accessing chests, or doing anything else involving interaction other than walking around looking at things.


    Coming soon:
    • More API functions
     
  2. Offline

    matter123

    Last edited by a moderator: May 16, 2016
  3. Offline

    Insidiea

    This is compatible with most plugins I presume?
     
  4. Offline

    codename_B

    Banana937 likes this.
  5. Offline

    matter123

    thats a compliment right?
     
  6. Offline

    codename_B

    Oh yes :D
    I spent hours trying to do that.

    Does your bridge support the tag(Player player); as well, or just the has(Player player, String node); ?

    EDIT: if it doesn't support the permissions "tag" or whatever they call it, then could you add it? :D I have an api call for it :)
     
  7. Offline

    matter123

    what is a tag the group prefix?
     
  8. Offline

    codename_B

    Yeah, the group OR the player prefix (though in this case, they are both called from the one API call, which returns player prefix in preference of group prefix)

    Basically make this plugin work with existing chat plugins, and we'll be laughing :D

    EDIT: if you could get it working with things like iChat for 2.x that would be AMAZING too :D

    I'll leave you to it, as you know what you're doing far better than me :) I'll get working on my API calls.
     
  9. Offline

    matter123

    ok i need a api call to get groups by name and a list of the groups and what group a player is in

    grieferkill will be the first plugin to natively support banana permissions

    ok this line is used to get the group prefix
    per.getGroupPrefix(p.getWorld().getName(), per.getGroup(p.getWorld().getName(), p.getName()));

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

    codename_B

    Ok, it will be
    String getGroup(Player player);
    Boolean isInGroup(Player player, String group);
    String[] getGroups();

    What do you mean "get groups by name" though? What good will getting the group do you, what exactly do you want the function to return?
     
  11. Offline

    Geoff Winans

    *scratches head*

    .... Why?
     
  12. Offline

    codename_B

    Why what? I wanted a permissions plugin that was stupidly simple to setup and get working :)

    Now works with iChat

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

    Juze

    Very interesting, you amazed me yet again.

    /tag may be a little too generic though, may cause conflicts.
     
  14. Offline

    Torrent

    Hmm.
    Reminds me of the old hMod group system haha.

    Looking forward to when this gets released - keep up the good work! :)
     
  15. Offline

    codename_B

    Point taken, it's now /tagset

    Other than heroes, do you know of any other plugins which use transient permissions?

    Thanks, I've never used hmod but this was just how I wanted stuff organised :D

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

    Juze

    I'm still on Permissions 2.7.4. :p
     
  17. Offline

    codename_B

    Me too, well I was, I'm now on BananaPermissions :p (which should in theory be compatible with all permissions version, once I'm finished with it)
     
  18. Offline

    The Angry kat

  19. Offline

    Samkio

    Smells lemony.
     
  20. Offline

    ethood1999

    I'm not a plugin dev, I'm just wondering, do plugin developers have to change their plugins for their plugin to work with this and Permissions? Or will a Permissions-compatible plugin not work with BananaPermissions?
     
  21. Offline

    matter123

    if you use the bridge
    all plugins think you have permissions installed
     
  22. Offline

    codename_B

    If it works with permissions, and you use the bridge, it will work with this.
     
  23. Offline

    Windwaker

    I might just have to pick this up :)
     
  24. Offline

    The Angry kat

    Uhm code?
    [SEVERE] Could not load 'plugins/BananaPermissionsBridge.jar' in folder 'plugins':
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:172)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:194)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:117)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:109)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NoClassDefFoundError: com/ubempire/permissions/PermissionHandler
    at com.nijiko.permissions.PermissionHandler.<init>(PermissionHandler.java:12)
    at com.nijikokun.bukkit.Permissions.Permissions.<init>(Permissions.java:13)
    ... 13 more
    Caused by: java.lang.ClassNotFoundException: com.ubempire.permissions.PermissionHandler
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
    ... 15 more
    2011-06-23 22:04:11 [INFO] [BananaPermissions] version 0.0.5 is enabled!
    2011-06-23 22:04:11 [INFO] iChat (v2.3.1) enabled
    2011-06-23 22:04:11 [INFO] Done (0.205s)! For help, type "help" or "?"
    2011-06-23 22:04:13 [INFO] /109.169.72.117:49573 lost connection
    2011-06-23 22:04:26 [INFO] TheAngryKat [/78.151.53.80:17314] logged in with entity id 137 at ([ world] -127.2324470984139, 70.0, 79.97909978187056)

    Help?
     
  25. Offline

    codename_B

    Looks like you've got old versions of the stuff - update everything.
     
  26. Offline

    Lolmewn

    So, I wanna go from GroupManager to this. Can I still use my old config file? Or is there a way to convert it?

    Please convert for me:p
     

    Attached Files:

    Last edited by a moderator: May 18, 2016
  27. Offline

    codename_B

    Sure, $10.
     
    Wakko likes this.
  28. Offline

    Lolmewn

    wuuutz, I actually posted that one for matter123. :p
     
  29. Offline

    codename_B

    oh thats ok then XD
     
  30. Offline

    Lolmewn

    You can do it aswell if you want :p
     
Thread Status:
Not open for further replies.

Share This Page