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.8 - Feb 18th, 2012
    • Fixed potential issue with groups and perms not applying correctly.
  • v1.0.6 - Feb 17th, 2012
    • Fixed bug with certain manual rules not properly applying.
    • Changed Item text to use Vault if installed.
  • v1.0.5 - Feb 9th, 2012
    • Changed permission check to prefer Vault (if installed) over Bukkit.
    • Bugs zapped
  • v1.0.3 - Feb 9th, 2012
    • Changes mcMMO skill type checks to take advantage of their new api accepting strings instead of data types.
  • v1.0.2 - Jan 30th 2012
    • Added support for mcMMO versions with build newer than #1282 ( Jan 22nd 2012). Otherwise, same exact build.

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

  • Avatar of Shad0wSpl1c3r Shad0wSpl1c3r May 04, 2013 at 19:52 UTC - 0 likes

    @Geekola: Go

    I'm actually getting the same error, this time with McMMO. I think it's unrelated to your plugin. I am going to go through and update everything and see what happens.

    [EDIT]: Actually, it is just your plugin now. It has errors due to the methods being out of date :P Console freaks out and throws errors on Blockplace, EntityDamageByEntityEvent, various inventory actions, block pickup, and anything that NPCs do.

    When are you planning to release an update? I absolutely love your plugin :) It still works, I'm just sad at the console being unusable lol.

    Last edited May 20, 2013 by Shad0wSpl1c3r

    Vanwa-Arda Banner

  • Avatar of Geekola Geekola May 04, 2013 at 11:36 UTC - 0 likes

    @Shad0wSpl1c3r: Go

    Just tried latest Citizens and this build and not having any errors. Can you pastebin your itemRules config, Citizens config and anything else that could help me?

    BFAK:90760905,1b5996d6759b0a201012eb8c7f01da6babcd833b472bac57adf1a91590dded21

  • Avatar of Geekola Geekola May 04, 2013 at 11:34 UTC - 0 likes

    @welknair: Go

    Just did brief test with latest beta build and works as expected

  • Avatar of Geekola Geekola May 03, 2013 at 18:19 UTC - 0 likes

    Am out of the country on holiday right now... Will check this out as soon as I'm back

  • Avatar of welknair welknair May 03, 2013 at 17:40 UTC - 0 likes

    Is this being updated to 1.5.1?

  • Avatar of Shad0wSpl1c3r Shad0wSpl1c3r May 01, 2013 at 20:57 UTC - 0 likes

    I'm getting an error with Citizens2 and ItemRules. It spams my console every time an NPC attacks something. http:pastebin.com/3YkXcjdp

  • Avatar of demellion demellion Mar 26, 2013 at 10:00 UTC - 0 likes

    Got another problem. I moved from CB to Libigot (1.5.1) and now have an error on player death/logout/login:

    11:53:39 [SEVERE] Could not pass event InventoryCloseEvent to ItemRules v1.0.8
    org.bukkit.event.EventException
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:342)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:62)
            at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredLi
    stener.java:39)
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j
    ava:479)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:464)
            at net.minecraft.server.EntityHuman.die(EntityHuman.java:948)
            at net.minecraft.server.World.removeEntity(World.java:1039)
            at net.minecraft.server.PlayerList.moveToWorld(PlayerList.java:385)
            at net.minecraft.server.PlayerList.moveToWorld(PlayerList.java:376)
            at net.minecraft.server.PlayerConnection.a(PlayerConnection.java:1153)
            at net.minecraft.server.Packet205ClientCommand.handle(SourceFile:30)
            at org.spigotmc.netty.NettyNetworkManager.b(NettyNetworkManager.java:180
    )
            at net.minecraft.server.PlayerConnection.d(PlayerConnection.java:116)
            at net.minecraft.server.ServerConnection.b(SourceFile:35)
            at org.spigotmc.netty.NettyServerConnection.b(NettyServerConnection.java
    :66)
            at net.minecraft.server.MinecraftServer.r(MinecraftServer.java:588)
            at net.minecraft.server.DedicatedServer.r(DedicatedServer.java:229)
            at net.minecraft.server.MinecraftServer.q(MinecraftServer.java:476)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:408)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:573)
    Caused by: java.lang.NullPointerException
            at com.github.mineGeek.ItemRules.Store.IRPlayer.checkInventory(IRPlayer.
    java:507)
            at com.github.mineGeek.ItemRules.Events.Listeners.onInventoryClose(Liste
    ners.java:255)
            at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja
    va:340)
            ... 19 more
    

    Plugin is not broken, just spams this.

    Last edited Mar 26, 2013 by demellion
  • Avatar of demellion demellion Mar 22, 2013 at 19:57 UTC - 0 likes

    @Geekola: Go Socket can only drop, and not crafted. I'm thinking to make it not dropable and make it sell-only through "shopkeepers" plugin. Then restrict the trade item to be pickuped/crafted until some level ^_^. But if you gonna find something about restricting actions within furnace - should be awesome. Thanks for plug.

    Last edited Mar 22, 2013 by demellion
  • Avatar of Geekola Geekola Mar 22, 2013 at 09:56 UTC - 0 likes

    @demellion: Go

    Hmmm. I haven't tried this - but what about restricting the item from being crafted? Fairly sure offhand that the furnace screen governs crafting. Let me know either way!

  • Avatar of demellion demellion Mar 21, 2013 at 21:19 UTC - 0 likes

    @Geekola: Go

    No i mean not to block the furnace itself, but to block using some items to burn\being burned in it. I've got a DiabloDrops plug, which allows to insert sockets through furnace (but this plugin totally don't have any XP restrictions) so im using yours, and trying to deny the "socket" item to be "burned"

Facts

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

Authors