[FUN/ADMN] Professions v0.2.1 - Advance Group Selection Plugin [1060]

Discussion in 'Inactive/Unsupported Plugins' started by ArtemisTheSecond, Sep 3, 2011.

  1. Professions: A Group Selection Plugin
    Recommended Bukkit Build [1060]
    Version: 0.2.1
    Description: A very Simple but yet Advance Group Selection Plugin
    Inspired by: Roles by AnjoCaido
    Downloads: Professions.jar , Professions.zip
    Source: https://github.com/aRt3m1s/Professions
    this plugin uses the latest PermissionsEx...download it here
    this plugin needs iConomy...download it here

    Professions is a plugin that allows users to select there own groups, specifically the PEX permission groups. Before, this plugin is named Roles(orig. thread here) by AnjoCaido himself. Now, from Roles, it is renamed to Professions, because: one, the code itself is re-created from scratch, only yaml configs are a bit untouched . two, this project is still far from done. By the help of people, mostly by giving ideas, this project will climb its way up to the top. last, not the least, even though I'm still a beginner at java programming and has no knowledge of other programming languages other than java, i will devoting myself to this project until the end. Hope you all Like this.

    Features:
    • PermissionsEx support.
    • iConomy support. Joining and Leaving group will cost you some money.(configurable)
    • In-game settings.yml manipulation.
    • User's can change their own professions to some pre-made professions like: factions, jobs, subjobs, skills.
    • Time based leave, users cant leave the group right away. They have to wait for a couple of hours until they can leave. Joining is instant.
    • Multi-World support.
    • In-Game help, by Typing '/professions help' or '/p help'
    • In-Game help, by Typing '/settings help' or '/s help'
    • Permission for settings configuration is "professions.settings"
    Commands:




    commands (open)



    Settings.yml
    settings.yml (open)

    Code:
    
    world:
        professions:
            faction:
                limit: 1
                time: 192
                join-cost: 200.0
                leave-cost: 600.0
            job:
                limit: 1
                time: 48
                join-cost: 100.0
                leave-cost: 300.0
            subjob:
                limit: 2
                time: 12
                join-cost: 50.0
                leave-cost: 150.0
            skill:
                limit: 4
                time: 3
                join-cost: 25.0
                leave-cost: 75.0
    settings:
        default-limit: 999
        default-time: 0
        default-joincost: 0.0
        default-leavecost: 0.0
        enable-iConomy: true
    
    


    As you can see, i renamed config.yml to settings.yml, cause it sounds more appropriate. And i omitted the main-category and the default-group as i do not think we need that anymore. For some who does not know the stuffs in this yaml, here are some few explanation:
    (taken from AnjoCaido's Roles)

    world is the world name. This plugin respects PEX mirroring, so the name of the world must be the the same of the real world which you have data on PermissionsEx.
    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 subjobsrole.
    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.
    join-cost is the amount of money that will be subtracted to your holdings(the money in your hand, not you bank accounts money) every group join.
    leave-cost is the amount of money that will be subtracted to your holdings(the money in your hand, not you bank accounts money) every group leave.
    settings - this here is for settings.yml manipulation purposes only. This defaults will be created when u use the command addProfession.
    default-limit look at limit above.
    default-time look at time above.
    default-joincost look at join-cost above.
    default-leavecost look at leave-cost above
    • enable-iConomy enables or disables iConomy support

    and for the GROUPS
    we can find the groups in the permissions.yml of PermissionEx folder in plugins/
    heres an example:
    permissions.yml (open)


    Code:
    users:
        ViruSpreadeR:
            group:
            - Admin
    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:
                profession: faction
        Farmer:
            default: false
            permissions:
            - essentials.kit
            - essentials.kit.farmer
            - essentials.spawnmob
            inheritance: []
            options:
                profession-requirement: BlueFaction,RedFaction
                profession: job
        Healer:
            default: false
            permissions:
            - essentials.kit
            - essentials.kit.healer
            - essentials.heal
            inheritance: []
            options:
                profession-requirement: BlueFaction,RedFaction
                profession: job
        Fighter:
            default: false
            permissions:
            - essentials.kit
            - essentials.kit.fighter
            inheritance: []
            options:
                profession: skill
        Admin:
            default: false
            permissions:
            - '*'
            inheritance:
            - semiadmin
            options: []
        Miner:
            default: false
            permissions:
            - essentials.kit
            - essentials.kit.miner
            - flashlight.regular
            inheritance: []
            options:
                profession-requirement: BlueFaction,RedFaction
                profession: job
        FlyingMan:
            default: false
            permissions:
            - nocheat.moving
            inheritance: []
            options:
                profession-requirement: Fighter&SuperCart
                profession: skill
        Peasant:
            default: false
            permissions:
            - roles.joinrole
            - roles.leaverole
            - roles.myroles
            inheritance:
            - default
            options: []
        BlueFaction:
            default: false
            permissions: []
            inheritance:
            - peasant
            options:
                profession: faction
        Railer:
            default: false
            permissions:
            - essentials.kit
            - essentials.kit.railer
            inheritance: []
            options:
                profession-requirement: Miner
                profession: subjob
        SuperCart:
            default: false
            permissions:
            - minecartmania.*
            inheritance: []
            options:
                profession-requirement: Railer
                profession: skill
        Moderator:
            default: false
            permissions:
            - essentials.tp
            - essentials.tphere
            - essentials.item
            - essentials.give
            inheritance:
            - default
            options: []
    


    in these permissions.yml we need to put a special node for each groups or for the groups where you want to have Professions.

    these nodes GO into the OPTIONS node for every group you want to set as a Profession:
    profession: (String datatype) - in here goes your professions category like faction, subjob, job and skill.
    profession-requirement: (String datatype) - this node is a special one. This means to join this group you will need to have this groups also, aka requirement. And because PEX has not added multiple OPTIONS sub-datas, we will need to use the ','(or) and '&'(and) tokens. Let me give you an example:
    Code:
    groups:
        trainee:
            options:
                profession: subjob
                profession-requirement: BlackList&General,GlobalRisk&Commander
    
    this means that YOU can JOIN trainee group if you are in "BlackList AND General groups" OR if you are in "GlobalRisk AND Commander groups". GOT IT? if not...just post your problem.

    TO-DOS
    • make a separate professions for every permissions plugin that exists
    • i dunno , have idea? please post a reply
    oldChangeLogs (open)

    version 0.1.2​
    change /p me all command to just /p me​
    added /s help​
    fixed all exception errors​
    version 0.1.1​
    added commands to manipulate settings.yml in-game​
    fixed some error messages​
    version 0.1.01​
    added iConomy support​
    version 0.1.0​
    release of professions​


    this is the same as the Roles...all features of Roles is in this plugin
    the changes are just the commands
    and this has permissions now

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
    Terra-Network.org likes this.
  2. Offline

    Thequickthinkin

    I'll go check it out now! Thanks!
     
  3. and one reason i made this all new plugin...is cause if i make this the same as Roles...they wouldnt bother to read the thread...so i changed it so that you'll be forced to read this thread before using it
     
  4. Offline

    Thequickthinkin

    Okay Gotcha... I'll do some testing and post back in 10 minutes, with feedback, Thanks!
     
  5. i hope theres no problem...i test this on my local server with just myself...xD
     
  6. Offline

    Thequickthinkin

    I can join groups fine! Just I cannot leave them, Comes up with some text that says:
    You are unable to leave that group:
    1. That group has no proffesions
    2. Due to Time limits
    3.Not in group
    --------
    this is my settings.yml
    world:
    professions:
    faction:
    limit: 1
    time: 0
    This is when trying to Leave a faction.
     
  7. can u post your permissions.yml?
     
  8. Offline

    Thequickthinkin

    groups:
    default:
    default: true
    permissions:
    - modifyworld.*
    options:
    rank: '1000'
    Member:
    permissions:
    - professions.cmds.all
    inheritance:
    - default
    options:
    rank: '900'
    RedFaction:
    default: false
    permissions: null
    inheritance:
    - Member
    options:
    profession: faction
    users:
    vvmattozzvv:
    group:
    - Member
    worlds:
    world:
    group:
    - Member
    - RedFaction
     
  9. i just checked mine...its working perfectly

    do reload on console or use /p reload?

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

    Thequickthinkin

    I've done bothh, still nothing. No errors at all...
     
  11. it is working on my server...hmmm...let me think

    yo...sorry..mother ask me to wash two cars...brb...going to take a shower...one question first before i go...what command did u use?

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

    Thequickthinkin

    /p leave faction RedFaction
     
  13. the only explanation i have....is either you have your
    world.professions.faction.time is not "0"
    or...it would seem that your PermissionsEx is not the latest?download the lates PEX.jar here
    http://webbukkit.org/jenkins/packages/PermissionsEx/

    cause...i was just using your permissions.yml and your settings.yml to the word...and i havent got any error
    i joined and leaved and joined redfaction with no errors

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

    Thequickthinkin

    It always happened to me xD, I've been testing it from the beggining always I get errors :p
     
  15. did you download the jar or zip?
    here...copy this to your permissions.yml...OVERWRITE it
    Code:
    users:
        ViruSpreadeR:
            group:
            - Admin
            worlds:
                world:
                    group: []
    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:
                profession: faction
        Farmer:
            default: false
            permissions:
            - essentials.kit
            - essentials.kit.farmer
            - essentials.spawnmob
            inheritance: []
            options:
                profession-requirement: BlueFaction||RedFaction
                profession: job
        Healer:
            default: false
            permissions:
            - essentials.kit
            - essentials.kit.healer
            - essentials.heal
            inheritance: []
            options:
                profession-requirement: BlueFaction||RedFaction
                profession: job
        Fighter:
            default: false
            permissions:
            - essentials.kit
            - essentials.kit.fighter
            inheritance: []
            options:
                profession: skill
        Admin:
            default: false
            permissions:
            - '*'
            inheritance:
            - semiadmin
            options: []
        Miner:
            default: false
            permissions:
            - essentials.kit
            - essentials.kit.miner
            - flashlight.regular
            inheritance: []
            options:
                profession-requirement: BlueFaction||RedFaction
                profession: job
        FlyingMan:
            default: false
            permissions:
            - nocheat.moving
            inheritance: []
            options:
                profession-requirement: Fighter&&SuperCart
                profession: skill
        Peasant:
            default: false
            permissions:
            - roles.joinrole
            - roles.leaverole
            - roles.myroles
            inheritance:
            - default
            options: []
        BlueFaction:
            default: false
            permissions: []
            inheritance:
            - peasant
            options:
                profession: faction
        Railer:
            default: false
            permissions:
            - essentials.kit
            - essentials.kit.railer
            inheritance: []
            options:
                profession-requirement: Miner
                profession: subjob
        SuperCart:
            default: false
            permissions:
            - minecartmania.*
            inheritance: []
            options:
                profession-requirement: Railer
                profession: skill
        Moderator:
            default: false
            permissions:
            - essentials.tp
            - essentials.tphere
            - essentials.item
            - essentials.give
            inheritance:
            - default
            options: []
    
     
  16. Do you think you can somehow add iConomy support?
    If a player is using the join command for a specified group it costs amount x. If he hasn't got enough money, the command isn't executed?
     
  17. sure...im gonna check how Iconomy works now...and if i see what im looking...i will add it right away
    just join?or also leave too?
     
  18. Offline

    Thequickthinkin

    I like the idea of people paying to leave, so they pay for leaving there team (faction)
     
  19. is the plugin working now?
     
  20. I will test it later this evening or tomorrow!
    Join and/or leave sounds good, awesome if we can choose the amount inside the config ;)
     
  21. im working on it right now...in settings.yml there is "join-cost" and "leave-cost"
    is that a good idea?
     
  22. It's a very good idea!
    Sounds perfect for me and i will definitely test it till tomorrow!
    Nice Support and i hope you will get your "Plugin Developer" Status soon ;)

    Oooookay i tested it!
    2 Things:

    1) When i join a group (in my case a subjob), he adds the Default group, too .. look:
    Code:
        JEDressler:
            permissions: null
    group:
            - Default
            worlds:
                world:
                    group:
                    - Bergarbeiter
                    - Default
                    - Schuetze
                    - Default
                    - Ritter
    2)
    - Money transaction to join some group: works!
    - Limitation of groups: works

    Could you specify the "error"-Message i get when i do something i'm not allowed to?
    3 possibilities are to much, could you check it inside the plugin and display the right problem?

    -> If my time is not over: Because of time limitation
    -> If i'm not allowed to join: Because you're not allowed to
    -> I don't fulfill requirements: You do not ....

    I think you know what i mean ;)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  23. the first problem is a bug...it was solved in the lates pex.jar...download it in here
    http://webbukkit.org/jenkins/packages/PermissionsEx/
    and for your second problem...sure...im gonna make it so the error will be much more specific

    EDIT: the second problem is fixed...but i havent uploaded it yet...i am still adding some new commands...maybe will take awhile...but hope it will be released before the day is done
    EDIT2: the messages is fixed now, add new commands too.xD

    PLUGIN IS UPDATED: PLEASE DOWNLOAD THE LATEST

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
    Terra-Network.org likes this.
  24. Groups are not case sensitive?
    I just wondered, because your plugins is writing groups lower case, but ok seems to work ;)

    Yeah what should i say, it works!
    So small, so simple, so powerfull!

    *Did a test to check if the plugins checks the money before executing the command ... works!*
    *Only thing i did not test yet: requirements*
     
  25. yeah...its all not case sensitive...i dont know why i did that but it has to be lowercases.

    making some major changes...well not major to some users of this...im just recoding some stuff because i did not know that the other codes in my plugin has shortcuts...so i recommend this one, because it will be a bit faster

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

    Mrchasez

    Wow, This is really cool!
    Maybe it can hook into my plugin iOP
    and you can have Colored Professions like [Fighter]
     
  27. that should be posted in PermissionsEx
    this plugin does only is lets users join PEX groups with no help from admins
    PEX has the prefixes and suffixes
     
  28. Offline

    Mrchasez

    Ah, So its not exactly like Roles.
    Hmm, I see.
    Thanks :)
     
  29. it is exactly like roles...you dont know WHAT is roles

    PEX seems to have lots of bugs...i cant update this really fast cause the other plugins(PEX) has been really bad for this plugin...are you all sure that you want PEX as its permissions?

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

    Thequickthinkin

    Absouloutley I Don't know what i'd do without PEX, gm is outdated, permissions 3 is falling and the new superperms isnt stable enough.
     

Share This Page