ItemRules

Screenie

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

Screenie

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

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.

permissionnotes
itemRules.bypass.*Do not process ANY rules for player
itemRules.bypass.RULENAMEDo not process specific rule for player

Commands

commandargumentsexampleexplanation
/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.

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of kev3200 kev3200 Jul 17, 2014 at 00:02 UTC - 0 likes

    @Geekola: Go

    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)

    Last edited Jul 18, 2014 by kev3200
  • Avatar of kev3200 kev3200 Jul 02, 2014 at 22:21 UTC - 0 likes

    @Geekola: Go

    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.

    Last edited Jul 02, 2014 by kev3200
  • Avatar of Geekola Geekola Jul 02, 2014 at 15:00 UTC - 0 likes

    @kev3200: Go

    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

    BFAK:90760905,1b5996d6759b0a201012eb8c7f01da6babcd833b472bac57adf1a91590dded21

  • Avatar of kev3200 kev3200 Jul 02, 2014 at 13:43 UTC - 0 likes

    @kev3200: Go

    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?

  • Avatar of kev3200 kev3200 Jul 01, 2014 at 11:18 UTC - 0 likes

    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?

  • Avatar of Milspec Milspec Jan 06, 2014 at 11:57 UTC - 0 likes

    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. :-)

  • Avatar of Jo11yWombat Jo11yWombat Dec 29, 2013 at 18:28 UTC - 0 likes

    Does this plugin still work? Will it ever get an update? I could really use it.

  • Avatar of Nebuli2 Nebuli2 Jul 16, 2013 at 20:11 UTC - 2 likes

    So... will there be an update for 1.6.2?

    http://i55.tinypic.com/wio5t0.jpg

  • Avatar of digger514 digger514 Jul 02, 2013 at 01:35 UTC - 0 likes

    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.

    Last edited Jul 08, 2013 by digger514
  • Avatar of Geekola Geekola Jul 01, 2013 at 16:59 UTC - 0 likes

    @digger514: Go

    Hmmm. That doesn't sound right. Can you pastebin your config so I can have a play about?

Facts

Date created
Jan 27, 2013
Category
Last update
Jun 27, 2013
Development stage
Release
License
GNU General Public License version 3 (GPLv3)
Curse link
ItemRules
Downloads
2,842
Recent files

Authors