iProfessions
Heypoday,
iProfessions is a complete plugin for making a job-based economy for your server. Players will have a profession (Miner, blacksmith, ... Whatever you want) and will be the only players who could do some actions. For instance, if you create a blacksmith profession and give them some craft skills, only blacksmith players could craft weapons, shovels, ...
Of course, you create your professions, this is not pre-defined professions. iProfessions tries to make professions as customizable as possible, you can give them craft skills, destroy block skills, use item skills and many others.
It also offers more features like tree-profession (Make specialisation of profession), economy support, required field to learn a profession,...
Last thing, you can use iProfessions with BeardStat to use the required features (Allow a job only when player has done some things)
Hope you'll enjoy the plugin, very usefull if you have a lot of player and you want to make a real job-based economy. :)
/!\ This plugin NEEDS PluginsBaker to work, don't forget to install it ! :)
French Topic | Github | Bukkit Thread
Authors: Ptibiscuit
How to use
Configuration
Open config.yml, there's 3 parts of this config. Players will be filled by itself. Config contains some config:
- max_profession: Number of professions that you're player can have. The professions' configuration is a bit hard, there's a tutorial for How to create your profession at the end of this page, hope you'll understand it well. :P
Commands
- /plearn <Tag's profession> (iprofessions.learn.<Tag>): Learn a profession. The permission for this command changes depending of the profession. If the player wants to learn the profession "miner", he would have to have the permission "iprofessions.learn.miner".
- /pforget <Profession> (iprofessions.forget): Forget one of your profession.
- /paddprofuser <Player> <Tag's profession> (iprofessions.user.profession.add): Add a profession to a player.
- /premprofuser <Player> <Tag's profession> (iprofessions.user.profession.remove): Remove a profession to a player.
- /pwhois [Player] (iprofessions.whois.other): Display job of an other player.
- /pwhois (iprofessions.whois.self): Display your job.
- /plist <Profession> (iprofessions.list): Display the list of all online players who has this profession.
There are some special permissions:
- iprofessions.god: Allows the player to do anything, even if he hasn't the good profession.
Create your profession - Step to step tutorial
Outch, outch, i'll try to be the cleariest as possible for this tutorial. First of all, here is a ready-to-fill yaml configuration to create your professions:
professions: [Tag]: name: [Name] price: [Price] parent: [Parent] required: - category: [Category] key: [Key] require: [Require] hasnot: [Hasnot] skills: breakBlock: - id: [Id] hasnot: [HasNot] smeltItem: - id: [Id] hasnot: [HasNot] craftItem: - id: [Id] hasnot: [HasNot]
For this tutorial, we're gonna create a blacksmith profession (Read those operations while looking at the result at the bottom):
The tag of this profession will be blacksmith, it means that player will have to use "/plearn blacksmith" to learn this professions.
The name of the profession will be "Blacksmith", this field is the clear name of the profession with capital letter, spaces, ...
The price is the money player will have to pay to learn this profession. I choose that learning blacksmith will cost 150 iConomy money.
The parent field is special, it will be explained in the following part, it is usefull for creating tree of profession. For my blacksmith, I'll delete this field. :)
Required field contains a list of all the required to learn this profession. For our profession, in addition to paying 150 iConomy money, players should already have broken 15 blocks of stone and 10 blocks of coal. Hasnot field is displayed when a player has not accomplished the required field. ("{LEFT}" will be replaced by the number of action left to accomplish the required (Need to break 15 blocks, I've broken 10 blocks, {LEFT} = 5 :P ))
Required field are handled by BeardStat plugin (You can use iProfessions without using BeardStat, but so, you can't use the required field)
At this point of the tutorial, here is our profession:
professions: blacksmith: name: Blacksmith price: 150 required: - category: blockdestroy key: stone require: 15 hasnot: You have to break {LEFT} block(s) of stone. - category: blockdestroy key: coalore require: 16 hasnot: You have to break {LEFT} block(s) of coal ore. # And the rest ....
Now, the most important part of the configuration, skills !
When you give a skill to a profession, only players of this profession will have this skill and be able to what the skill says. For our profession, only blacksmith can craft golden and diamond tools (shovel, sword, axe, ...), break gold ore and iron ore and smelt those ore. Exactly like with the required field, hasnot fields are displayed when a player tries to do an action when he hasn't the right profession. Here is the all configuration of our black-smith profession:
professions: blacksmith: name: Blacksmith price: 150 required: - category: blockdestroy key: stone require: 15 hasnot: You have to break {LEFT} block(s) of stone. - category: blockdestroy key: ironore require: 16 hasnot: You have to break {LEFT} block(s) of coal ore. skills: breakBlock: - id: 14,15 hasnot: This block is too strong, only a black-smith can break it ! smeltItem: - id: 14,15 hasnot: It's too hot for me, only a blacksmith can smelt that ! craftItem: - id: 283,284,285,286,276,277,278,279,293,294 hasnot: I can't craft this item, maybe a blacksmith can ? ...
There's a lot of type of skill. Here we've just used 3 of them, but you have a list of all type of skills below.
You can also specify a metadata, like with wool ("35-4", "35-14", ...) or stairs.
If you want others example, to see how make a complex schema of professions, you can check the Free sample, I'll try to create a lot of samples. :)
Types of skills
Tag | Purpose | Example of configuration |
---|---|---|
craftItem | Allows the craft of an item | id: 257 hasnot: You can't craft that. |
smeltItem | Allows the player to put an item in the smelt slot of a furnace | id: 14,15 hasnot: You can't smelt that. |
breakBlock | Allows the player to break a type of block (All players are able to break block that have been placed by a player during a same server instance (If you reload or restart the server, players won't be able to break blocks that have been placed).) | id: 1 hasnot: You can't break that. |
placeBlock | Allows the player to place a type of block | id: 2 hasnot: You can't place that block. |
gainMoneyOnBreakBlock | Player will win money when he'll break a block (Don't win money with a block they have placed) | id: 1 reward: 1 |
gainMoneyOnKillCreature | Player will win money when killing a creature. (List of all types of creature here) | type: PIG,CREEPER reward: 50 |
dropItem | Allow the player to receive drop when breaking an item. | id: 1,5,2 |
wearItem | Allow the player to wear an item (helmet, boot, ...) | id: 306 hasnot: You can't wear that |
Make a tree of profession (specialisations)
You can make specialisations for professions, those professions gets the skill of their parent profession with the skill they have. Also, learning one of those professions requires to have learn't the parent profession. For instance, I want to create 2 professions:
Miner, players would first have to learn that professon. Miners can break Iron ore and Redstone Ore.
Then, players can choose between 2 professions:
Gold Miner, they have all the skills of Miner plus breaking Gold ore.
Diamond Miner, I think you have understood the thing, they have miner skills plus breaking Diamond ore.
Here is a simple schema which explains the situation:
And here is the configuration to create those kind of professions:
professions: miner: name: Mineur skills: breakBlock: - id: 15,73,74 hasnot: This block is too hard. gold_miner: name: Mineur d'or parent: miner skills: breakBlock: - id: 14 hasnot: This block is too hard. diamond_miner: name: Mineur de diamant parent: miner skills: breakBlock: - id: 56 hasnot: This block is too hard.
Notice the "parent: miner" field added for the gold_miner and diamond_miner profession.
Last thing, you have to write sub-profession AFTER the parent profession !
Make group of professions
It's an other feature that allows you to force your player to take a specific combinaison of profession. For instance: Imagine I'm trying to make a server WoW-Like. In World of Warcraft, you have basically 2 kind of professions crafting and farming profession. Farming profession are like miner, herbalist, sheep shearer, ... Crafting profession are like blacksmith, tailor, alchemist, ... In my server, I have 6 profession: miner, herbalist, lumberjack, blacksmith, alchemist and engineer. The first three are my "farming" professions, and the last three are my "crafting" one. :) In my server, players can take 2 professin, but, I want that they can take only 1 farming profession and 1 crafting profession. Well, with iProfessions, that's possible ! :D Go to your config, and find the "professions_group" node. By default, you have that:
config: max_profession: 2 profession_groups: - max_profession: 1 professions: - farmer - miner
If you have nothing, try to generate a new configuration by deleting your actual config (Don't forget to make a copy ;X) and reload the plugin. For my server, I'll create 2 groups, set the max_profession for each group to 1, and list all my "farming" professions and my "crafting" professions. Here is the result:
config: max_profession: 2 profession_groups: - max_profession: 1 professions: - lumberjack - miner - herborist - max_profession: 1 professions: - blacksmith - tailor - alchemist
Logically, the sum of all the "max_profession" of all your groups should equal to the global "max_profession" of your config. (Here, 1+1=2) /!\ Last thing, if you're working with specialization (To set up a profession tree), "professions" node in your groups have to contain only root professions (Profession that has not parent).
Link a group to a profession
If you want that when a player learn a profession, he's added to a group, well, linked_group is for you ! :P To configure a linked group, just add this to a configuration of a profession:
professions: miner: name: Mineur linked_group: miner price: 50 ...
When a player will learn the profession "miner", he will be added to the group "miner". When he forgets or he specializes the profession "miner", he will be removed. /!\ If you use the linked_group feature, you can't change the profession of a player by modifying the file because it would desynchronized groups and professions !
List of all the category of required
In the tuto, we used the category "blockdestroy", but there are more than just this one. Actually, there isn't a list of all valid category-keys, cause this is managed by BeardStat. You can easily, if you turn the config to a Database, check your database too see all the possible category. Here is a little list of my database. :)
Category | Key | Description |
---|---|---|
blockdestroy | iron, dirt, ironore, stone, ... | Block destroyed, I don't think you need more explanation :P |
itempickup | sapling, dirt, ... | Idem |
crafting | wood, ... | This is crafting item |
blockcreate | ironore, ... | Placed and not craft item ! |
deaths | total, fall, ... | Number of deaths |
stats | chatletters, chat, login, move, playedfor, firstlogin, lastlogin, lastlogout, totalblockcreate, totalblockdestroy, damagehealed, move, | This is stand-alone stat |
kills | skeleton, spider, total, ... | People killed |
damagetaken | fall, arrow, skeleton, total,... | |
damagedealt | arrow, skeleton, entityattack, ... | |
itemdrop | wood, ... | |
exp | currentexp (The current level), lifetimeexp() | |
Use sign to make actions
You can create signs that make actions for player when they interact with them. It is simple, write "[iProfessions]" for the first line of the sign. For the second line, it depends of what you want the sign does:
- learn <tag's profession>: Will do exactly what "/plearn" does, try to learn a profession (permission: iprofessions.sign.learn.<Tag>). For instance, the permission to learn the profession "miner" with a sign is "iprofessions.sign.learn.miner".
- forget <tag's profession>: Will do exactly what "/pforget" does. The required permission to use the sign is iprofessions.sign.forget.<Tag>
- Maybe some other action, in the future. :)
Exemple, if you havn't understood: :P
Hello, it would be possible (please), a small adjustment in your plugin "iprofessions"?.
I have found that if two different jobs, share the same block / item, you have to unite the two jobs so that you can break / put / crafting / etc .. that block / item.
I created very different works, and some of them share some block / item, but do not want that, the player need to join the two jobs to, you can break the block (for example). It would be possible that if a job is set to "block break" block "ID 15" and another different job, has also put in "block break", the block with "ID 15", you do not have to join the two jobs?, with be in a single work of these two, is enough to break the block.
I ask you please to make this change, because it is 100x100 necessary for this "plugin" serve me because it is a logical function. It should not be required to learn all professions who share a block, to break ...
Thanks and regards.
Ok after a very quick test it seems the v3.3 works with the newest version of beardstat 0.4.8 ice cream. I havn't tested everything yet but so far it seems to work. I will say this . It is very very easy to get your sytex/indents wrong or even have a missing hasnot statement all of which will cause something like the following type of crash 02:40:05 [SEVERE] Error occurred while enabling iProfessions v3.3 (Is it up to date?) java.lang.NullPointerException at com.ptibiscuit.iprofession.data.models.skill.SkillSmeltItem.onEnable(SkillSmeltItem.java:27)
also note some of my hasnot statements might not be needed but I got tired of going deaf shouting at my screen to fix the stupid error.
To everyone that can't seem to get everything working here is an example file that does work 100% but you have to use the right versions of other plug-ins . http://pastebin.com/b6mFMPi7 if you can't get the miner profession it is not a bug with iprofessions it is because your beardstat isn't a compatible version. I haven't had any issues with the price field but it could have the same issue. I have tested this on the 3.2.1 version using the beardstat found here https://github.com/tehbeard/BeardStat/downloads I will post as soon as I try it on the new alpha version with a newer version of beardstat the version of beardstat I have doesn't work
@MsPtibiscuit
Ouch!
You're right, now it works: D
One question, I would take a long time to add some more skill, such as not being able to carry things, for example, "you can not hold an ax" or just the opposite, not to "Dropped" an object / item.
Another question, accept the plugin, new objects / items that are to be added in the update 1.4?.
After I try it, it works now the parent between jobs?, Ie if I work two jobs, one beginner and one advanced. In the beginner can get that break the block with "ID 1" .... parent advanced work, with work beginning ... I have to specify in the advanced work that also can break the block with "ID 1" or recognize it by being, parent beginner workand I have not to specify it in the advanced work?.
@Q2Lummox
- category: breakBlock key: stone require: 50 hasnot: Necesitas romper {LEFT} bloques de piedra todavia. It's blockdestroy, you have a table at the end of the presentation when you have all the category-key value. :)
Yes I can see in the statistics of "BeardStats" I've broken the necessary blocks.
My config (See the work "minero")
http://pastebin.com/Xwy2EK3G
Using the version, 4.0.8 of "BeradStats"
@Q2Lummox
I suppose that you have BeardStat, did you try to make a /stats to see your stats, can you give me your configuration ?
Everything works besides the wearItem carrying on through the parents. the config is hella- picky though my god.
I have only had time to try the option, "Required", but still does not work. I set which to select a job, you have to break before 50 blocks of stone. And I've broken more than 100 and still get the message "You need to break 50 blocks of stone."
Later I try the other things that were not working, see if they have fixed.
Here is a test version, I tested it on my personnal server, and everything that was bugged works. Can some people test it before I release it ? Thanks you. :) Link Removed: http://www.mediafire.com/?ztddk11lbxs7s6d N.B.: I remove the "You can destroy blocks you've placed", if you want to use it, you'll have to add a configuration in the config.yml. :)
Oh! It's a shame... anyway, thanks for your answer and for open the source code! Thanks so much!
Source code are available there is somebody want to follow the plugin: https://github.com/Ptibiscuit/iProfessions
I've don't have time anymore to take care of my plugins, I try to support iGates, iProfessions and MineShop but it's just too much. Sources are always availaibles if someone want to take the plugin, I'll try to make a fix version but I can't promise.
This plugin does not work Shadix64, the function of gain levels based on "BeardStats" does not work.
It has many errors, I would say this pluign this already abandoned. Would be nice if someone uses the "source code" and fix all the bugs you have, that really is a very good plugin and can not find any plugin that resembles it.
A pity that the author has abandoned the project ...
If I could only leave the "source code" for someone to fix ...
Pitbiscuit, as apparently has abandoned this plugin, It would be appreciated to those who want to use, offering the "source code" for another programmer to fix all the bugs that have pluigin and preventing their use.
A lot of people like your plugin, but among the faults he has, and that it has no support (ie not argue, no one forces you to go), but it is a shame that a plugin as good no longer used by I've abandoned you.
Could you please let other developers take charge of your plugin, so that all who are willing to use it, we do it without any error?.
I would like to think that you will read this and it will answer, but unfortunately, something tells me that this message will fall into oblivion ...
I have spent hours and hours and HOURS on this plugin, and it still doesn't work. I have set a very simple required field for blacksmith that they have to break 25 stone to learn it. However when my users try it, it never counts the stone they've broken. I've gone over your tutorial multiple times, examples, other people's configs, YAML parser, and nothing.
I've got beardstats, pluginbaker and vault. I could seriously use looking at someone else's working script, one with multiworld support (would be nice), multiple requirements per stat, multiple abilities and such. Thanks in advance, this plugin really excited all my server members when I told it to them.
Any news of the plugin "iprofessions"?. Were you able to fix errors?.
d yes, it is a shame not receive virtually no support this plugin. The author is active, but does not respond to messages. Me sent a test version (theoretically fixed) but did not solve anything,
A shame, because the idea of the plugin is very good.
A greeting.
Ok, I'm going to have to give up on this plugin. Lackluster response by the dev, and none of the features work as advertised. I'm not an Op, I'm not an admin, with standard member perms in survival mode, none of the tags are working. I can break blocks, craft items and smelt items that are listed as restricted by the profession. I already figured out that the tutorials by the dev listed above are spaced incorrectly, and I fixed that, so clearly I'm able to parse the code, but unless someone can show me what else I'm doing wrong, we won't be using this plugin. I'm still getting the true/false spam that other users have also reported as well. If only the dev would take less than two weeks to respond...Until this plugin is fixed or I get a response back telling me what I'm doing wrong, I'll be shelving this plugin as well. Too bad though, cause it's an incredible idea. I really wished it would work. I've spent the better part of two weeks trying to get it to function properly...
Good day,
I am sorry to bother you, but i am desperate. I spent 10 hours of coding,
My config ,
and I made up awesome system. It is tech tree based and it features most of the plugins abilities, BUT, Its not working ._.
Here is the situation:
And this is the outcome:
------------------------2.09 18:32:08 [Multicraft] Skipped 13 lines due to rate limit (60/s)
22.09 18:32:04 [Server] Startup Done (2.790s)! For help, type "help" or "?"
22.09 18:32:04 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:365)
22.09 18:32:04 [Server] INFO at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
22.09 18:32:04 [Server] INFO at com.ptibiscuit.iprofession.Plugin.onEnable(Plugin.java:51)
22.09 18:32:04 [Server] INFO at com.ptibiscuit.iprofession.data.YamlData.loadProfessions(YamlData.java:102)
22.09 18:32:04 [Server] INFO at com.ptibiscuit.iprofession.data.models.skill.SkillBreakBlock.onEnable(SkillBreakBlock.java:27)
22.09 18:32:04 [Server] INFO at com.ptibiscuit.iprofession.data.models.skill.SkillSimpleId.onEnable(SkillSimpleId.java:25)
22.09 18:32:04 [Server] INFO at java.lang.Integer.<init>(Integer.java:677)
22.09 18:32:04 [Server] INFO at java.lang.Integer.parseInt(Integer.java:492)
22.09 18:32:04 [Server] INFO at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
22.09 18:32:04 [Server] INFO java.lang.NumberFormatException: For input string: "17:3"
22.09 18:32:04 [Server] SEVERE Error occurred while enabling iProfessions v3.3 (Is it up to date?)
22.09 18:32:04 [Server] INFO [iProfessions] Enabling iProfessions v3.3
--------------------------I love this idea of plugin and i did learned a lot about it. But there is obvivously something from in the .jar file.
Creator of this plugin, your idea is thruly awesome but it makes me very frustated because i spend so much time over learning and writing the config.
Please, try to make this plugin work, i am kinda sticked to it :) cus its so awesome. I hope my "bug" report helped with your developement. Please reply asap. Thank you for everything.
- vlastav
to khirsah- make sure you aren't OP.
and I seem to be having issues with the parent permissions, they require what is above them but the skills do not carry down.
also craftItem doesn't seem to work for me anymore, although smeltItem, wearItem, and breakBlock do. confusion!
thanks, I'll give it a shot tomorrow. I was able to get the scripting to run last time, but when building 'miner' and setting breakblock to 14, 15, I could still break coal and iron ores without actually taking the miner profession. Do you have any issues with people getting around the scripting like that, or does it work as advertised for you? Maybe I'm doing something wrong, but I'd sure like to figure out what!
@KhirsahFireflash
I'll post it here this is the basic structure: