Roles v2.0.1
Roles (re-coded) The user-driven group selection plugin.
(originally created by AnjoCaido on this thread)
Roles - The user-driven group selection plugin.
version 2.0
I AM RECREATING THIS PLUGIN...AGAIN...BECAUSE OF A MASSIVE MESS OF CODES OF THE PLUGIN
I MEAN BY MESS IS BECAUSE THE ALL THE CODES ARE IN JUST IN ONE CLASS, SO ITS MESSY TO READ...AND IF ITS MESSY TO READ,
IT WILL BE HARD TO SEE WHERE THE ERRORS OR BUGS ARE...SO I WILL BE RECREATING THIS...AND MORE, I WILL ADD GUIs.
SO YOU DONT HAVE TO TYPE THE COMMANDS...JUST JOIN A ROLES "and" GROUPS BY A DISPLAY...JUST USE A COMMAND TO POP UP THE DISPLAY...THIS WOULD TAKE DAYS...AS I HAVE TO LEARN FIRST HOW GUIs WORK...SO WISH ME LUCK
oh and feel free to comments some suggesstions for this plugin...i might add it here if i can do it...thx
NOTE: Please read this first
As you all know, or not, i don't have my own server, and haven't played Minecaft for months. And I also don't have the time to get my server public, because I'm pretty busy studying java(still a noob) and creating some simple plugins from plugin requests in bukkit site. So, as i don't have the time to test this myself, I need testers. Test this plugin first please and if there's a problem or a bug, post a comment in here or submit a TICKET by clicking the button on the upper right corner of this page. THANKS all.
Main
FIRST of all, THIS plugin does not support GroupManager anymore. But if u really like GM, i could look into it too and update it myself. But that will be more harder than this cause I think i have to learn more advance programming, and learn how superperms work. But(xD, lots of buts), it will widen my knowledge of java too, so its all good.
SECOND , as i said earlier, GM support is gone. I guess your thinking what permission THIS plugin supports now huh? The answer to that is PermissionsEx also known as PEX. And because of the great turn of this plugin, migrating the Roles plugin from GM support to PEX support is really hard(hard for me, easy for advance devs). That is why I'm forced to RE-CODE it all and start from scratch. And for the second time, as i said earlier, this is why i need testers. Testers should have many users in their server and willing to test this plugin. The many the users, the more bugs and problems will be known, the more work for me...xD
THIRD , ah. there is not even a third. This was the reason why I'm looking for plugin requests in bukkit forums. I need ideas. I cant think of any ideas so give me ideas on a plugin. Or what do you want me to add on this plugin.
FOURTH , do not worry...this is the last. I will say this in advance, sorry for my bad English. Apparently my first and main language is not English, so please do not criticize me, and just try to understand what I'm saying. Or just tell me that you do not understand what i said, and I will try to make it more clearer the next time.
INFOsNsTUFF
most of the stuff here are from the original thread of AnjoCaido
Roles
Roles, in my understanding, basically, is a plugin that let users choose their own groups, i mean roles. But(uh oh, buts are coming), there is more to it than choosing roles and groups. Users can choose there roles such as:factions, jobs, skills and etc. These roles are the core of the plugin. With these roles, you can choose any groups within the role. Also, the time limit, our old friend. This time limit is to stop users to join or leave a group all the time. They have to wait until the specified cool-down has come down to 0. That time limit is configurable. make it a lifetime...lol... And last but not the least, hmmm...i think that is it. Tell me if i left out something and i will see to it.
Commands
(nothing changed here)
commands: joinrole: description: Join a role of your choice. permission: roles.joinrole usage: | /<command> [category] [group] leaverole: description: Leave a role of your choice. permissions: roles.leaverole usage: | /<command> [category] [group] myroles: description: List roles you have. permissions: roles.myroles usage: | /<command> [category] whoroles: description: List somebody else roles. permissions: roles.whoroles usage: | /<command> <player> [group] roles: description: Reload Roles configuration. permissions: roles.roles usage: | /<command>
Config file
(nothing changed here too)
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.
now for the big change, or rather small, nah i think its big.
the GROUPS file
because we changed from GroupManager to PermissionsEx, we need to use the PEX groups. For every groups in PEX yaml, there is a special node where we put our own Roles variable.
These following nodes go inside the OPTIONS node for every group you wanna set as a Role:
- rolesCategory: faction - Type accepted: String - Explanation: this is setting a group for a role called faction.
- rolesRequirement: 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:
rolesRequirement: - BlueFaction - RedFaction
To enforce multiple roles as requirement, you put role names in same entry separated by the character '&', just like this:
rolesRequirement: Fighter&SuperCart
Example of permissions.yml file on PermissionsEx, using Roles:
groups: default: default: true permissions: - essentials.help - essentials.home - essentials.motd - essentials.sethome - essentials.spawn SemiAdmin: default: false permissions: - some.permissions inheritance: - moderator options: tes.tes: '100500' RedFaction: default: false permissions: [] inheritance: - peasant options: roles-category: faction Farmer: default: false permissions: - essentials.kit - essentials.kit.farmer - essentials.spawnmob inheritance: [] options: roles-requirement: - BlueFaction - RedFaction roles-category: job Healer: default: false permissions: - essentials.kit - essentials.kit.healer - essentials.heal inheritance: [] options: roles-requirement: - BlueFaction - RedFaction roles-category: job Fighter: default: false permissions: - essentials.kit - essentials.kit.fighter inheritance: [] options: roles-category: skill Admin: default: false permissions: - '*' inheritance: - semiadmin options: [] Miner: default: false permissions: - essentials.kit - essentials.kit.miner - flashlight.regular inheritance: [] options: roles-requirement: - BlueFaction - RedFaction roles-category: job FlyingMan: default: false permissions: - nocheat.moving inheritance: [] options: roles-requirement: Fighter&SuperCart roles-category: skill Peasant: default: false permissions: - roles.joinrole - roles.leaverole - roles.myroles inheritance: - default options: [] BlueFaction: default: false permissions: [] inheritance: - peasant options: roles-category: faction Railer: default: false permissions: - essentials.kit - essentials.kit.railer inheritance: [] options: roles-requirement: Miner roles-category: subjob SuperCart: default: false permissions: - minecartmania.* inheritance: [] options: roles-requirement: Railer roles-category: skill Moderator: default: false permissions: - essentials.tp - essentials.tphere - essentials.item - essentials.give inheritance: - default options: []
TO-DOS
- If requested, I will try to update GroupManager and hook it in this plugin
Add in-game commands to auto add rolesCategory and rolesRequirement in PEX permissions.yml- Add in-game commands to configure config.yml like add categories, change limit of the roles or time limit
- GUIs
- (open for ideas, as long as i can make it...xD)
scusa, è possibile creare posti di lavoro e gruppi?
can i use this on cb1.7.2-r0.3?
May I suggest using Vault for group support? It will let you write your plugin, and it will work with multiple permission systems. It is a well-known permissions library, supporting groups, and it is an abstraction so you can support many permissions systems at once without directly hooking into all of them.
Sry if I#m asking or if youre annoyed of questions like this, but is this plugin active?
A lot of thinks dont work:
First on using /joinrole job is only "error 2" and I wouldt have any roles to join. This is one Role for example, but I cant join it ingame.
Minenarbeiter:
default: false
info:
prefix: ''
suffix: ''
build: false
inheritance: null
permissions:
- mcmmo.skills.mining
- mcmmo.ability.mining
options:
rolesCategory: job
AND PLEASE update your plugin!
Hi. How about to add an option for buing and renting roles? I hope you'll rewrite this plugin soon.
WHO LIKES GUIs?
maybe sometime, if this plugin gonna be popular... I'm gonna put a GUI or a display that list all available roles and stuffs...so that you do not have to use commands. Well just a command to pop-up the display. What do you think?
@Thequickthinkin
first...what is the full command did you typed?its easy for me to answer problems if you include all necessary informations
and second...i see in your permissions.yml the "roles-category"...as i said in the INFOsNsTUFF i replaced the it with "rolesCategory" and also the "roles-requirement" to "rolesRequirement"...please read thoroughly the INFOsNsTUFF carefully, cause this plugin, even has little changes...it will cause your server to have errors...so please read the infos and stuffs first
Hello! Thank you for trying to make this plugin, and in such a short time too!
However, when I try to use the 'joinrole' command it replies with:
error 1
you can't join that role.
nothing in the server log, I have suitable permissions.
permissions.yml
users:
vvmattozzvv:
group:
- citizen
groups:
citizen:
default: true
permissions:
- modifyworld.*
- roles.*
options:
Rank: '1000'
roles-category: faction
Templar:
default: false
permissions:
- modifyworld.*
inheritance:
- citizen
options:
Rank: '990'
roles-category: faction
UPDATED: Download link is at the bottom of the page
@OrtwinS
oh yeah...xD...havent think of that...hmmm...its been hours now...don't know why they have not approved this yet...imma ask someone about this
Ingame commands to add info nodes in the PEX file should not be nessesary, PEX should have such commands itself.