[INACTIVE][ADMN/MISC] Roles - The user-driven group selection plugin [440-531]

Discussion in 'Inactive/Unsupported Plugins' started by AnjoCaido, Mar 9, 2011.

  1. Offline

    AnjoCaido

    Roles - The user-driven group selection plugin.
    Version: v1.1

    You need at least GroupManager 1.0 alpha-5 to use this!

    Features:
    • Easy role categorization
    • Good integration with GroupManager
    • Let your users choose their roles in server, such as:factions, jobs, skills and etc. No need to do it for them.
    • Time based "leave", so your users can't join-leave groups all the time. They need to wait the amount of hours you choose to leave a role.
    • Multiworld support!

    Commands:
    Code:
    commands:
      joinrole:
        description: Join a role of your choice.
        usage: /<command> [category] [group]
        permission: roles.joinrole
      leaverole:
        description: Leave a role of your choice.
        usage: /<command> [category] [group]
        permission: roles.leaverole
      myroles:
        description: List roles you have.
        usage: /<command> [category]
        permission: roles.myroles
      whoroles:
        description: List somebody else roles.
        usage: /<command> <player> [category]
        permission: roles.whoroles
      roles:
        description: Reload Roles configuration
        usage: /<command>
        permission: roles.roles
    This system is quite simple, yet functional. Hope it fits most people needs.
    All commands can be done only by players.

    All groups are added as a user subGroup, except when the user join a role of the main category. Those roles really change the user group when joined.

    Config file:
    Code:
    world:
        categories:
            faction:
                limit: 1
                time: 168
            job:
                limit: 1
                time: 24
            subjob:
                limit: 2
                time: 12
            skill:
                limit: 4
                time: 1
        setting:
            defaultgroup: Peasant
            maincategory: faction
    
    world is the world name. This plugin respects GM mirroring, so the name of the world must be the the same of the real world which you have data on GroupManager.
    faction,job,subjob,skill are the categories that you use on group specification. You can create as many as you want like that.(use always lower case, please)
    limit is the quantity of roles of that category each user can join in. subjob is 2, so everyuser can join in two subjobs role.
    time is the amount of time, in hours, a player need to wait before leaving a group that he joined of such category. The usual is the bigger the role, the bigger the time. No need to explain that.
    maincategory You can optionally set a category for users to choose their main groups. When a group change a role of main category, he will have his prefix, suffix, build and other variables affected, just like he get physically changed groups(instead of subgrouping).
    defaultgroup will tell Roles to which group should take a user if he leaves a group of the main category. So if you leave your faction, you will be redirected to Peasant group. No need for this if you don't use main category.

    Got it! So, where are the groups?
    In your GroupManager… for every group, there are special variables you put in them, where Roles will read and decide what to do.

    These nodes go inside the INFO node for every group you want to set as a Role.
    roles-category: faction - Type accepted: String - Explanation: this is setting a group for a role called faction
    roles-requirement: Miner - Type accepted: List/String - Explanation: this telling you that for you to join this role, you must have joined a role(group) called Miner.
    Every entry of the list is considered a full requirement, so you just need to fulfill one of the requirements to be able to join.
    Example:
    Code:
    roles-requirement:
      - BlueFaction
      - RedFaction
    To enforce multiple roles as requirement, you put role names in same entry separated by the character '&', just like this:
    Code:
    roles-requirement: Fighter&SuperCart
    Example of groups.yml file on GroupManager, using Roles:
    Code:
    groups:
      Default:
        default: true
        permissions:
        - essentials.help
        - essentials.home
        - essentials.motd
        - essentials.sethome
        - essentials.spawn
        inheritance: []
        info:
          prefix: ''
          build: false
          suffix: ''
      SemiAdmin:
        default: false
        permissions:
        - +groupmanager.mandemote
        - +groupmanager.manpromote
        - -groupmanager.*
        - '*'
        inheritance:
        - moderator
        info:
          prefix: '&c'
          build: true
          suffix: SemiAdmin
      RedFaction:
        default: false
        permissions: []
        inheritance:
        - peasant
        info:
          prefix: '&c'
          roles-category: faction
          build: true
          suffix: Red
      Farmer:
        default: false
        permissions:
        - essentials.kit
        - essentials.kit.farmer
        - essentials.spawnmob
        inheritance: []
        info:
          roles-requirement:
          - BlueFaction
          - RedFaction
          prefix: ''
          roles-category: job
          build: false
          suffix: ''
      Healer:
        default: false
        permissions:
        - essentials.kit
        - essentials.kit.healer
        - essentials.heal
        inheritance: []
        info:
          roles-requirement:
          - BlueFaction
          - RedFaction
          prefix: ''
          roles-category: job
          build: false
          suffix: ''
      Fighter:
        default: false
        permissions:
        - essentials.kit
        - essentials.kit.fighter
        inheritance: []
        info:
          prefix: ''
          roles-category: skill
          build: false
          suffix: ''
      Admin:
        default: false
        permissions:
        - '*'
        inheritance:
        - semiadmin
        info:
          prefix: ''
          build: true
          suffix: ''
      Miner:
        default: false
        permissions:
        - essentials.kit
        - essentials.kit.miner
        - flashlight.regular
        inheritance: []
        info:
          roles-requirement:
          - BlueFaction
          - RedFaction
          prefix: ''
          roles-category: job
          build: false
          suffix: ''
      FlyingMan:
        default: false
        permissions:
        - nocheat.moving
        inheritance: []
        info:
          roles-requirement: Fighter&SuperCart
          prefix: ''
          roles-category: skill
          build: false
          suffix: ''
      Peasant:
        default: false
        permissions:
        - roles.joinrole
        - roles.leaverole
        - roles.myroles
        inheritance:
        - default
        info:
          prefix: '&e'
          build: true
          suffix: Peasant
      BlueFaction:
        default: false
        permissions: []
        inheritance:
        - peasant
        info:
          prefix: '&d'
          roles-category: faction
          build: true
          suffix: Blue
      Railer:
        default: false
        permissions:
        - essentials.kit
        - essentials.kit.railer
        inheritance: []
        info:
          roles-requirement: Miner
          prefix: ''
          roles-category: subjob
          build: false
          suffix: ''
      SuperCart:
        default: false
        permissions:
        - minecartmania.*
        inheritance: []
        info:
          roles-requirement: Railer
          prefix: ''
          roles-category: skill
          build: false
          suffix: ''
      Moderator:
        default: false
        permissions:
        - essentials.tp
        - essentials.tphere
        - essentials.item
        - essentials.give
        inheritance:
        - default
        info:
          prefix: '&c'
          build: true
          suffix: Mod
    Latest Build Download:
    https://github.com/downloads/gmcouto/Roles/Roles.jar

    Changelog:
    Version 1.1
    • Fixed a bug ClassNotFound exception with newer CB builds.

    ===========================================
    Source:
    https://github.com/gmcouto/Roles
     
    ElkStalker likes this.
  2. Offline

    MationMac

    Seems really advanced.
    May try it once i solve my problem, for now, its 23:45 in Norway.

    Btw, good job, im impressed you actually made this!
     
  3. Offline

    Olat

    Thank you again for making this plugin at my request. This along with SubGroups for Group Manager is forever changing how Permissions will be handled. Every RPG server will now love you.
     
  4. Offline

    Pencil

    It would be cool if there would be a faction "leader" that had to approve when people try to join :D And would it be possible so people can't hurt each other inside factions? Anyways, great job!
     
  5. Offline

    AnjoCaido

    This plugin is not meant to be a RPG manager. It is just a GroupManager extension to help your users to get their groups by themselves.

    The factions thing are just an example. By now, I use only a job category on my server, so my users when join, they can choose their jobs without need for moderators.

    Those features you listed sounds great, but they should be done by another plugin.
     
  6. Offline

    Pencil

    Hmm, sad :p But the faction leader or "group" leader would fit to this plugin ;D
     
  7. Offline

    AnjoCaido

    Well, to moderate groups there is GroupManager commands. Roles exists because we don't want to need moderation.

    If you want to make a group private, just don't make it a role.

    Example:
    Make a group like BlueWannabe.
    Make the group BlueFaction
    Then group BlueMaster.

    Set up inheritance thru them... and give the BlueMaster ability to /manpromote and /mandemote
    Set the BlueWannabe as a role, so anyone can join in it. Any BlueMaster will be able to promote any BlueWannabe to BlueFaction.

    I didnt tested it with all this subgroup system and role yet. In fact, /manpromote and /mandemote(with all other GM commands) were designed in a main group concept.
    And there is a lot of new things happening, hard to keep up and test 100% guaranteed.

    But if you set factions as main group, this thing probably will work.
     
  8. Offline

    Pencil

    Hmm, never thought of that! Gonna try it out :D Thanks!
     
  9. Offline

    AnjoCaido

    It seems to work here, just as expected.
     
  10. Offline

    Olat

    @AnjoCaido
    Anyway you can update this for the CB 493 Recommended?

    Im getting this error with 493
    (Yes i know it says 440, but i was using 493 before this was developed)
    Code:
    2011-03-11 13:35:42 [SEVERE] Could not load plugins/Roles.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:85)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:129)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:94)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:58)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:187)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:174)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:120)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:227)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoClassDefFoundError: org/anjocaido/groupmanager/dataholder/WorldDataHolder
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:264)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:72)
            ... 8 more
    Caused by: java.lang.ClassNotFoundException: org.anjocaido.groupmanager.dataholder.WorldDataHolder
            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:30)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
            ... 11 more
    
     
  11. Offline

    AnjoCaido

    When I updated the server I got this error too... posting the fix.
    [MERGETIME="1299848113"][/MERGETIME]
    Done. Roles 1.1 fixed that error.
     
  12. Offline

    Link2o1o

    I've got this problem:
    22:11:21 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'join
    role' in plugin Roles v1.0
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80
    )
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1
    83)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:645)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:608)

    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:602)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:76)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NullPointerException
    at org.anjocaido.roles.Roles.onCommand(Roles.java:118)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more
    I don't know why this is happening help would be appreciated
     
  13. Offline

    Mr_Mellow

    I get this when i try to join a role
    20:57:18 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'join
    role' in plugin Roles v1.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80
    )
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1
    83)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:645)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:608)

    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:602)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:76)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NullPointerException
    at org.anjocaido.roles.Roles.onCommand(Roles.java:126)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more
    >
    also, whenever i type /joinroles it doesnt show me any roles....whys that?
     
  14. Offline

    Olat

    /joinrole is the command not /joinroles on top of that it isnt made to list the Roles.
    What I have done is made a role for Each Profession and Skill class from the mcMMO plugin
    Then in the documentation of my server IE New Player Guide / Plugin Info pages I tell people
    "to join the Role of an Archer.. type /joinrole Archer"
    This is ONLY if you have the permissions group of Archer set up etc etc.

    I have 3 Role Categories. for my Server
    Faction (Main Group)
    Skill (SubGrp)
    Profession (SubGrp)
    So when a new player joins he must pick a Faction FIRST this then allows him to ONLY join Sub Grps that his faction is allowed.
    Then he picks a skill
    then a Profession

    Now he has all the permissions from those given SubGrps.

    To clear up any errors make sure CB is updated to 493 at a minimum.. im running 531, also Update Group Manager as this Requires GroupManager.
    If youd like to see my Config / Groups yml files lemme know. Hope this helps Understand Roles better and fixes any errors
     
  15. Offline

    Mr_Mellow

    actually, if you wouldnt mind, could i have a look at your groups yml file please? im confused as to what im doing wrong and it sounds like your going for the same thing as me.
     
  16. Offline

    Olat

  17. Offline

    MizLiv

    Does this work with Permissions, or do I need GroupManager?
     
  18. Offline

    enkryptor

    I think you can't manage Permissions roles ingame, so GroupManager is the only option.
     
  19. Offline

    Mr_Mellow

    Im still getting these errors. joinroles works...but doesnt show any actual choices. but when i type joinroles [writing] it says, a internal error occured while attemtping to perform this command.

    19:34:20 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'join
    role' in plugin Roles v1.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80
    )
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1
    83)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:645)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:608)

    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:602)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:76)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NullPointerException
    at org.anjocaido.roles.Roles.onCommand(Roles.java:126)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more


    id really like to know what causes this...
     
  20. Offline

    Mr_Mellow

    Code:
    19:43:49 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'join
    role' in plugin Roles v1.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80
    )
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:1
    83)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:645)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:608)
    
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:602)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:76)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NullPointerException
    at org.anjocaido.roles.Roles.onCommand(Roles.java:145)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more
     
  21. Offline

    Penorzilla

    Currently on my server I have two different types of groups. Members and Premiums.

    I would like to set it up where a Member can only join certain types of roles and a premium can only join certain types of roles.

    So lets say as a member you get these roles: miner and fighter.

    As a premium you would get: pminer and pfighter.

    This way I could set it so miner would get the ability to mine but a pminer can mine and also excavate (referring to mcmmo plugin)

    And a fighter could fight with fists and a pfighter would fight with fists and axes.


    So I guess what I am asking is can you make it so roles-requirement: can use a regular GroupManager group instead of a role group?
     
  22. Offline

    WolwX

    I'm sorry, I'm probably wrong somewhere but ...
    I tried with the "sample" files you give us, the same one from EssentialsGroupManager, but I never reach my goal to show something correct :(

    Everytime I type any command, that's result in a simple "Role categories available:" without nothing :(

    When I try for exemple "/joinrole farmer" that's result with that console error :
    Code:
    14:52:49 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'joinrole' in plugin Roles v1.1
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:80)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:229)
    at net.minecraft.server.NetServerHandler.c(NetServerHandler.java:645)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:608)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:602)
    at net.minecraft.server.Packet3Chat.a(SourceFile:24)
    at net.minecraft.server.NetworkManager.a(SourceFile:230)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:76)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:357)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NullPointerException
    at org.anjocaido.roles.Roles.onCommand(Roles.java:126)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more
    >
    So what I did wrong ?
    Someone can help me please ?
     
  23. Offline

    sam salter

    Is there a way to get suffix to show the name. For example [Admin][Miner][xPoiSoNx]Test
    i have tryed putting the suffix of Miner to miner but it does not show
    And i am using iChat
     
  24. Offline

    KoryuObihiro

    Any chance for Permissions integration, perhaps as a different plugin?
     
  25. Offline

    MizLiv

    Update for CB build 556 anytime soon?!

    I really need this for my server, *cries*.
     
  26. Offline

    Windwaker

    Eagerly awaiting an update :)
     
  27. Offline

    jeddeliso

    I dont know what you guys are talking about, but this plugin works wonders for me, i use CB 670 , GroupManager v1.0 alpha 3, i have currently 20 groups! and it is AWESOME HAVING THIS PLUGIN! :D congrats to @AnjoCaido , i salute u sir! :D
     
  28. Offline

    2Bucks

    This plugins is more useful than you guys may think, and it desperately needs an update
     
  29. Offline

    -JHB-

    since AnjoCando haven't been around. We're taking this over.
    As soon as we release it. I'll post the Link here.
    The plugin will be called Professions and will fully implement Roles.
    There will be some extra features as well.
     
  30. Offline

    Windwaker

    Not if I beat you to it >:)
     

Share This Page