ItemRestrict
Use this plugin to ban items and blocks for Bukkit, Tekkit, and FTB servers using the Bukkit API. ItemRestrict removes banned items from the world and player inventories. It is easy to configure, can be applied retroactively, and automatically removes the items. It requires no permissions plugin unless exceptions are need for certain players. It is compatible with 1.2.5, 1.3.2, 1.4.7, 1.5.2, 1.6.4, 1.7.10.
Because every story that starts with "We decided to make a change..." shouldn't end with "...so we had to reset the world."
Installation
Copy the .jar file into your plugins folder to install the plugin. Then restart the server or use a plugin manager to load the plugin.
Commands
Use the command "/ires reload" to reload the config file.
Command | Permission Node | Description |
---|---|---|
/ires reload | itemrestrict.reload | Reload the config |
/ires ban <banType> <id-datavalue> | itemrestrict.ban | Add item to the ban list |
/ires unban <banType> <id-datavalue> | itemrestrict.ban | Remove item from the ban list |
Configuration
There are 4 major sections in the cofig file (config.yml). Enabled worlds are listed under Worlds. World Ban scanner settings is under Scanner. Ban settings are under Bans. Notification settings to the player are under Messages. A default config for Tekkit was generously created by BigScary.
Worlds listed in the Worlds section are enabled worlds which will be checked by the plugin. You can name normal worlds, dimensions, and mystcraft worlds by using the world's folder name. Add the case sensitive world called "All" to bypass the world check.
The Scanner settings indicate the percentage chance (from 0 to 1) that it scans a loaded player or a loaded chunk.
You can specify the items you wish to ban under the Bans section. Take a look at the different types of bans below. An entry with only the item id (32) will specify ALL wool (all datavalues). An entry with the item id and datavalue separated by a dash (32-2) specifies MAGENTA wool (datavalue 2). Some items have a different values in your inventory as opposed to ones place in the world (eg. a door item in the inventory versus a placed door in the world). A full list of Block IDs will help you add banned items.
The label gives the item a name when notifying the player. The reason provides the reason of why the item was banned for them. You can use colour with both the label and the reason by using the escape character "&" and a hex number corresponding to the minecraft colour.
Permissions
Making Ban Exceptions
You can make individual ban exceptions to give some players to generally banned items through permission nodes. A player who has /op automatically ignores bans. Specifying the item ID without the datavalue means all data values (-*). Here are various examples, which should help you understand without further explanation.
- ItemRestrict.bypass.usage.35 - ItemRestrict.bypass.ownership.35-6
You can't prevent a specific player's placed block from being removed from the world as this plugin does not track who owns placed blocks in the world.
Types of Bans
Usage Bans
This ban prevents players from using an item, which means left-click or right-click while the item is in-hand. This ban also prevents players from right clicking a block specified by this ban. This ban also prevents a player from building a block in the world. This works well for items like the Mining Laser, but won't stop players from using items which benefit from passive use (eg. modded armors, Talisman of Repair, etc.). You will need an ownership ban to prevent players from getting those items at all. A player that already has an item which is later placement-banned can still trade it with another player or break it down into energy (EE mod) to get some value out of it.
It's not possible for any plugin to prevent a player from using an item when it is activated by a keystroke (eg. R, G, C, etc.), which are common especially for Equivalent Exchange items. This is why many EE items are on the default ownership bans list even though their functions are not all really ban-worthy.
It is recommend to place most or all usage ban items to your ownership ban list. This will prevent your players from unknowingly spending their resources to craft a block which they then can't place in the world like they planned leading to them feeling cheated and likely complaining. The only exception you might make to this rule is for an item which can't be placed, but is still useful because it's an ingredient in another recipe for an item you haven't banned.
Ownership Bans
This ban prevents player from picking up an item from the ground or from a container (eg. a chest). If a player doesn't have permission to own an item, they won't be able to craft it. The contraband scanner will search each player's inventory for ownership-banned items and actually remove them without warning, notification, or compensation.
This ban also prevents players from crafting an item. When the player tries to craft the item, they get a message that they can't. This is the most player-friendly approach to preventing players from getting banned items. Forge mods don't always hook into Bukkit, meaning its possible for players to get banned items through some automatic or non-crafting approach (eg. alchemy). When you crafting-ban an item, test for workarounds, which may lead you to ban additional items to prevent those workarounds.
World Bans
This ban will retroactively remove the placed block from the world through the Asynchronous World Scanner (AWS). This is great if you need to ban an item, but also know it's in the world (eg. energy collectors and world anchors). This will help clean up newly-banned items without having to search your entire world for them. There are exceptions to this removal as the scanner can't determine who owns the block.
Notes
This plugin uses the idea from BigScary's TekkitCustomizer. However all components in his code have been replaced with high performing and simple implementations. As a server administrator, I care about performance as much as you. Thus no code is actually used from the TekkitCustomizer plugin and the source code can be found here.
The default ban list is made for Classic Tekkit based on hands on testing done by BigScary. Before deciding to remove items from this list, be sure to read the reasons for default bans to understand why it was originally removed. If you are running FTB, Tekkit Lite, or other mod packs, do your own research for what you want banned and change the config file accordingly.
Save yourself some time! Check our Frequently Asked Questions page for the answer to your question. If you found a bug, make a ticket and include your config file.
Reviews
Spanish
Supporters
Thank you to piritacraft for testing each ticketed issue. Thank you to excavator5 for testing the plugin.
Thank you to our contributers that have helped contribute to this project:
- Slind14 from mineyourmind.net
- maxmar628
Thank you to our supporters that have generously donated to ItemRestrict:
- Thundercoyote
Donations
Unlike other players who have a choice to play the game, my commitment to development and administration usually means I cannot and I'm fine with that choice. A lot of my free time is actually spent designing, developing, testing, and fixing plugins like this one to make Minecraft more enjoyful for all players. If you like this plugin, please consider sending me a donation by clicking the button below :) Thanks!
i have a few questions
1. is it compatible with tekkit classic
2. is it possible to prevent usage when block is placed eg stop a person interacting with an energy collectors
3. does it recognise any blocks around the prevented block eg a condensor thats in an mk3 energy collector power flower
would appreciate if you swung by my tekkit classic server: tekkit.ruby-craft.net as i may consider moving from tekkit customizer
@HeyAwesomePeople
Can you quickly make a ticket? Thanks to Slind14, the next release should fix any async issues.
@Zulgol
Most tekkit mods have a config in the config folder that can disable crafting certain items or crafting altogether.
Getting a error while running. Using tekkit version 1.5.2. Using plugin version 1.5.2. Error Code:
[m 2013-12-12 21:38:15 [SEVERE] Exception in thread "pool-1-thread-516" 2013-12-12 21:38:15 [SEVERE] org.apache.commons.lang.UnhandledException: Plugin ItemRestrict v1.4 generated an exception while executing task 1527 at org.bukkit.craftbukkit.v1_5_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalStateException: Asynchronous entity track! at net.minecraft.entity.EntityTracker.func_72785_a(EntityTracker.java:196) at net.minecraft.entity.EntityTracker.func_72786_a(EntityTracker.java:155) at net.minecraft.world.WorldManager.func_72703_a(WorldManager.java:37) at net.minecraft.world.World.func_72923_a(World.java:1854) at net.minecraft.world.WorldServer.func_72923_a(WorldServer.java:1216) at net.minecraft.world.World.func_72868_a(World.java:4010) at net.minecraft.world.chunk.Chunk.func_76631_c(Chunk.java:1067) at net.minecraft.world.gen.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:215) at net.minecraft.world.gen.ChunkProviderServer.func_73158_c(ChunkProviderServer.java:151) at net.minecraft.world.gen.ChunkProviderServer.func_73154_d(ChunkProviderServer.java:254) at net.minecraft.world.World.func_72964_e(World.java:727) at org.bukkit.craftbukkit.v1_5_R3.CraftChunk.getHandle(CraftChunk.java:46) at org.bukkit.craftbukkit.v1_5_R3.block.CraftBlock.getTypeId(CraftBlock.java:139) at info.terrismc.itemrestrict.ConfigStore.getConfigStringParent(ConfigStore.java:214) at info.terrismc.itemrestrict.ConfigStore.isBanned(ConfigStore.java:65) at info.terrismc.itemrestrict.ConfigStore.isBannable(ConfigStore.java:129) at info.terrismc.itemrestrict.QuickStore$1.run(QuickStore.java:32) at org.bukkit.craftbukkit.v1_5_R3.scheduler.CraftTask.run(CraftTask.java:58) at org.bukkit.craftbukkit.v1_5_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53) ... 3 more
It happened while literally just running. Thanks.
@Zulgol
A known workaround is to ban the item using this plugin. If you wish to remove the recepe entirely from the game, a mod is required. I'm not a fan of mods (go figure), so I suggest that people use the plugin instead. Go with whatever works for you guys.
If its not possible to do with a plugin then people could take a peak at
http://www.minecraftforum.net/topic/1621605-162164forge-recipear-203-make-recipes-vanish-ic2-supportservermod/
I will be returning to active development in 2 days.
@unga23
I will take a look into it, but to my knowledge, it is not possible to restrict custom recepies for custom blocks as no bukkit events fire for crafting table-like mods.
@McyD1
Please submit a bug with the config file and server logs. I will take a look in 2 days.
AWESOME PLUGIN! The only thing:
PLEASE ADD CUSTOM RECIPES FOR MODDED SERVERS!
Example: I want to change some recipes and also give some people permissions, or creating recipes so we can manage all the crafting and smelting!
:) thank you!
Just updated the my server to 1.6.4, and MCPC+ .150 and item restrict 1.4 is not working at all. I can get it to reload from the command line, but other than that is not enforcing any of the bans I have set.
Hey guys, just a heads up that I am unable to make any code changes from now until Dec 10 due to exams. I will have day and night to work on issues and features after that date.
@potop999
this is my Config for FTB Unleashed anyone can use or do anything with it
http://pastebin.com/gDmQTv
Just a heads up that I won't be available to look at the issues until the weekend.
My config for FTB Unleashed v1.1.6 http://pastebin.com/RCaYugFj
@ajay01281990
I would like to get your config, if you could post it here, so I can compare it to my own.
This doesn't contain the crafting ban that is in tekkit customizer? Am I correct or am I looking over it?
if anyone need my config for banned items For FTB UNLEASHED 1.1.3
@ruisjz
Olha vou te passar meu config.yml do meu plugin GroupManager e o groups.yml do mundo de mineração onde estaria as permissões para liberar o uso da quarry e Land Mark.
Config: http://pastebin.com/gJFJ3KYb groups: http://pastebin.com/UA6HwpRJ
@piritacraft
Tu na tua configuração fizes-te como eu fiz? meter um bypass tanto para owner como para usage?
@ruisjz
Neste caso nunca testei. Vou perguntar ao krisdestruction
Não, eu uso é o permissionEX