ItemRules
ItemRules is a simple to use, but highly configurable plugin for controlling how, when and even where items and blocks can be used, picked up, crafted, placed or broken based on the world, a players xp level, the faction they are in, their mcMMO skill level, their rank/group, their permissions, and more. It is a complete rewrite/revisioning of my previous plugin LevelRestrictions
Latest Builds
ItemRules can allow you to restrict items and blocks based on XP level and/or will integrate with Factions (e.g. allow only certain factions to use certain items), McMMO (e.g. restrict ores from being mined unless mining skill is a minimum level), Vault (e.g. restrict weapons based on permission group).
ItemRules will also allow you to configure certain rules that will be applied when players walk into defined regions (e.g. a PvP zone that only allows you to use carrots as weapons)
Configuration Examples
- Click here for details on configuring basic rules.
- Click here for details on configuring rules that only apply to specified areas.
Here is an example of restricting iron tools and equipment until player is level 2:
ironEquipment: description: 'Use of iron stuff until level 2' messages: restricted: 'You cant %s %s until level 2' actions: [USE, BREAK, PICKUP] xp: min: 2 items: restrict: [256, 257, 258, 267, 292]
Here is an example of McMMO integration that prevents cutting down Birch trees until woodcutting skill is level 2:
Woodcutting-Brichwood: messages: restricted: 'You cant cut birch until woodcutting 2' actions: [BREAK] mcmmo: skills: woodcutting: 2 items: restrict: ['17.2']
You can also specify rules to apply to groups (note this requires Vault) by adding this to your rule:
groups: applyto: ['newbs', 'badpeeps']
You can use the same format to exclude rules from groups (using Vault) like:
groups: exclude: ['vips']
Permissions
Note that by default all OP's will bypass rules.
permission | notes |
---|---|
itemRules.bypass.* | Do not process ANY rules for player |
itemRules.bypass.RULENAME | Do not process specific rule for player |
Commands
command | arguments | example | explanation |
---|---|---|---|
/rules | [playername] | list all rules currently applied to player. No arguments for self |
Change log
- v1.0.9 - Jun 21st, 2013
- Silent exception handling when Entity attacks player with an invalid item.
- v1.0.8 - Feb 18th, 2013
- Fixed potential issue with groups and perms not applying correctly.
- v1.0.6 - Feb 17th, 2013
- Fixed bug with certain manual rules not properly applying.
- Changed Item text to use Vault if installed.
- v1.0.5 - Feb 9th, 2013
- Changed permission check to prefer Vault (if installed) over Bukkit.
- Bugs zapped
- v1.0.3 - Feb 9th, 2013
- Changes mcMMO skill type checks to take advantage of their new api accepting strings instead of data types.
- v1.0.2 - Jan 30th 2013
- Added support for mcMMO versions with build newer than #1282 ( Jan 22nd 2013). Otherwise, same exact build.
@kev3200
Appreciate your understanding. I did start to review and update - but RL has been a whirlwind (and will be for the next month). I will get back to it and look to implement your suggestion when things settle down (and we get clarity on future of modding)
@Geekola
Alright. Sorry to sound mean in the last comment. It's just been like a month and a half since you last replied so I was getting frustrated. I understand IRL has its own complications.
When you do have time, what I would really like added is simply an ItemRules reload command. My problem is that the changes to a player's permissions were not recognized by the plugin immediately. If there was a reload command, I could tell it to reload the plugin after every change. Unless you can think of a simpler way of it checking for changes.
@kev3200
I simply lack the time in real life to review at the moment. I will happily do so once I do have time and it becomes clear what the future of modding is going to be.
Until then, the source code is linked and freely available for others to contribute/fork.
@eduardo31
I've been asking @Geekola to update this plugin since July 1st. Apparently he hasn't looked at it in a year or something like that. (excuses)
@Geekola, if you can't moderate your own plugin, please hand the responsibilities off to someone who can. You are keeping a lot of people held up and what with the new 1.8 update, we need a plugin update really soon. If you are abandoning this project please do so formally instead of just leaving us hanging.
Update please it's my favorite plugin :D
@Geekola
I would love an update on this.
Hey Geekola,
I'm still here and still waiting for an update. I've abandoned my project for now until one comes out. This plugin really is a crucial part and an update would be extremely helpful. If you aren't going to keep this plugin updated, please hand the responsibilities off to someone else...
Update plugin plz :D
@Geekola
I would really appreciate a response as this problem still exists and I'm not sure how to proceed.
EDIT: This is one of my core plugins and an update or workaround (such as an /ir reload command maybe?) to get the plugin to recognize changes in a player's permissions immediately would be greatly appreciated...
PS. (A reply to this comment would be nice so I know you actually saw it)
@Geekola
Thank you for responding. Would it be possible for you to release an update? I have something I would like added.
It would be very helpful if the plugin recognized when a player's permissions were updated without me having to /reload the server after any change. Right now, everything works fine, but when I add or remove a permission from a player, I need to /reload the server from the console for ItemRules to recognize the change; something I would greatly prefer not to have to do since I run a bigger server and it takes a couple seconds to reload each time.
Also, in your examples file (for basic configs) the option for permissions, the exclude sub-option, has the permissions read just like this: mycustom.permission. However, after numerous testing and frustration, I realized that the config actually only reads the permission when it is in this format: ['mycustom.permission']
It would be nice to change that so others are not confused. And a new release would be very nice, just to change the reload problem I mentioned. Other than that, the plugin works great, I was just confused at first.
@kev3200
Hi Kev, I haven't updated this in over a year so am going off memory here... But read the part about permissions... I am assuming you are an OP:
Note that by default all OP's will bypass rules.
You may need to add a negative permission to you for: itemRules.bypass.*
to your permissions
@kev3200
Ok I figured out part of the problem. I had accidently had ItemRules disabled :P
But, the rules still aren't working. When I type /rules on my test server it says: 'You have no rules applied to you.'
Why is this?
I'm having a problem on my 1.7.9 server. I have this in my Config that I took from the examples:
rules: diamondEquipment: description: 'use of diamond equipment until level 5' messages: restricted: 'You cannot %s %s until level 5' xp: min: 5 actions: [USE, CRAFT] items: restrict: - 276
But it doesn't seem to be doing anything. I also have this:
rules: woodenEquipment: description: 'use of wooden equipment' messages: restricted: 'You cannot %s %s until a higher level' actions: [USE, BREAK, CRAFT] permissions: exclude: allowed.woodenSword items: restrict: ['268,270']
but that doesn't seem to do anything either... Is my syntax wrong or what?
I installed ItemRules v1.0.10 on my test server running Bukkit 1.7.2-R0.2 and everything worked fine in a new 1.7.4 world. I spot-checked new item ids that were released after the last ItemRules was published and it behaved normally.
I use McMMO, Factions, PermissionsEX and a few other plugins and ItemRules appears to be playing nicely with them all. Your results may vary. :-)
Does this plugin still work? Will it ever get an update? I could really use it.
So... will there be an update for 1.6.2?
http://pastebin.com/ZDhFsCm1
Update: I'm not sure why but the permissions aren't working for me, both default and ones added for exceptions or applyto. Same goes for groups, the exceptions and applyto's are not working.
@digger514
Hmmm. That doesn't sound right. Can you pastebin your config so I can have a play about?
I did this and experimented with it, but what it's doing is it's applying the allows to me when I'm below the level posted, and not applying them when I'm above the level posted. So basically it lets me use the axes until I reach the level requirement I would otherwise have to reach to use them, and then it restricts me from using them.
@digger514
I haven't tried it, but you should be able to create a rule that simply denies Axes to everyone. Then create a rule that explicitly gives axes to Woodcutting level 50 and another for Axes level 50 (if that makes sense). Something like: (untested)