[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

    Inferno

    Someone need's to update this when 1.2 comes out or it wont work since the code is being cleaned up...
     
  3. Offline

    Inferno

    This plugin NEEDS to be updated, I will reward anyone who is willing.
     

Share This Page