[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. dont mind my last comment...PEX dont have bugs yet...it was my mistake
     
  3. Offline

    Thequickthinkin

    in V1.14 Of PEX it will seperate groups and users into seperate files :D
     
  4. thats nice...i be looking forward to it

    plugin updated...major fixed is for the error exceptions...which i dont think you need to know

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  5. Please don't make it to complicated, it's really nice as it is now! :)
    There are 1mio plugins, that can create suffixes and prefixes ^^

    Your plugin has become one of the most common plugins of my new server, i won't miss it anymore and the new server isn't live yet ^^
     
  6. i didnt changed anything..i just recoded it...but its al the same i just changed the /p me all to /p me and added /s help
     
  7. I know, but i know users, too and they mostly want more and more and more features till the plugin is so complicated, that updates to new CB-versions needs longer time and the number of errors is increasing. ;)

    I hope this will become a released plugin soon!
     
  8. yeah...i will make it as simple as possible...this plugin will never be complicated
    and thx for supporting this plugin...i hope so too that this plugin will be released
     
  9. I have a question, because i don't know much about plugin development:
    Is it complicated to upgrade ist to be compatible for other permission plugins, too?
    Maybe that a user can choose which he uses or that your plugin can choose it automaticly?
    It's not a request, PEX is fine for me ;)
     
  10. Offline

    Thequickthinkin

    I like the plugin how it is now, implementing it on my server for Races soon! (Dwarves have mining abilities(mcmmo) Elves have some magic abilities) This plugin is very lightweight and can become expandable by the user!
     
  11. xD...just thinking about it now...its too complicated for me...i do not even know where to start...but i think i can do that...if someone requested this...i will surely make it so if a person has different permissions i will enable the codes for that permission and make PEX codes in my plugin be disable
     
  12. Offline

    Thequickthinkin

    Will this conflict with the mcmmo party commands /p join ?
     
  13. hmm...use /professions join instead of /p join

    i will be making some major changes again...nothing will change...i have learned a lot of stuff in java now...but the major change is only on the codes...not the commands...i will just try to make it more faster and better

    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

    I think you could definetly class this as a RP plugin xD

    Suggestion:
    Optional iConomy support, not everyone likes it
     
  15. okay...i will add options in settings.yml to disable iConomy
    and i will add the category [rpg]
     
  16. plugin is updated:
    Changes that will need your attention:
    • the commands : check the commands part...not really a big change but just transferred the reload command from /p to /s. The me and list commands is a bit changed too. just use /p me instead of /p me all. use /p list instead of /p list professions to show the available professions
    • the PEX OPTIONS: instead of '||' and '&&'...i changed it to ',' and '&' accordingly.
    • enable or disable iConomy: now u can disable iConomy support. just change it in the settings.yml
    • removed permissions: i meant by permissions is the professions.cmds.all and others...not the PEX itself...i do not think users need this
    • fixed the issue about cases: its not all lower-cases now...it has capitalization now like the group Names and users names
    • CHECK CHANGE LOG FOR MORE FIXES
    i think thats it...if you got problems just pm me or reply in this thread
     
  17. Offline

    Thequickthinkin

    And I really liked the idea of permissions...
     
  18. *Vote for Plugin Releases update ;)*
     
    ArtemisTheSecond likes this.
  19. thanks for the support

    update again:
    added permissions for settings configuration
    xD...stupid mistake, dont want all players to have the command /settings

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  20. i have think about it...i will when RB for 1.8 comes out
     
  21. Offline

    Thequickthinkin

    When RB comes out xD
     
  22. Gratulations!

    Plugin Releases & Plugin Developer

    Great job! :)
     
  23. i just found out now...xD...thanks
     
  24. Offline

    Thequickthinkin

    Congratulations Artemis! I will go get [diamond] in your honour! :)
     
  25. xD...thanks
     
  26. @ArtemisTheSecond

    Damn, now i need Support for SuperPerms :(
    (PermissionsBukkit in my case)
    Do you think you can add it? :/
     
  27. i can try...whats the link of bPermissions or permissionsBukkit?
     
  28. Very nice!
    Even Permissions (v2 / v3) would do it, because there are bridges to manage it, but i think with SuperPerms your plugin will become more users.
     

Share This Page