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!
Is there a way to ban an item in a specific world?
@DMahalko
Async chunk processing is done to allow async scanning on the server. Chunk loaders obviously aren't built into the Bukkit API and I don't see any specific way to handle that on my end. LemADEC is right though, you shouldn't use ChunkLoaders on a public server as they can be very easily exploited.
@DMahalko
Bukkit is still maintained through the Spigot team. Cauldron has been forked and still maintained under a new name.
We can only guess at your error without providing a full log, so I'll give you the usual Tip regarding chunkloading: - ChickenChunks is as good for gameplay as it is bad for SMP, save your pain and remove it from your server. - ChunkLoaders are bad for public server in general, just remove them globally.
Followup to my own question. Got it solved. 1.7.10 Phoenix Reborn is repaired. No chunk loss, no region loss.
The Item Restrict "Asynchronous World Scanner" is conflicting with all other chunkloading and will cause the server to repeatedly crash with bizarre 40-line Java errors that all mention "concurrency"... Exception ticking world, java.util.ConcurrentModificationException
This is probably a bug that may not occur with older servers using Cauldron/MCPC+, but the 1.7.10 Bukkit project is dead so the bug that causes this can not be fixed at this point. However I did find a workaround to stop the crashing and allow AWS to do its job.
To temporarily disable chunkloading, edit forgeChunkloading.cfg and set all values to zero:
# (Comment lines are disabled)
# I:maximumChunksPerTicket=25
I:maximumChunksPerTicket=0
# I:maximumTicketCount=200
I:maximumTicketCount=0
# I:playerTicketCount=500
I:playerTicketCount=0
After the world has been repaired and all offending items removed, disable all world Item Restrict to turn off AWS (but keep items in the usage/ownership Item Restrict categories), and revert forgeChunkloading.cfg to original values to restore chunkloading.
- Dale Mahalko (server admin, Andromeda Network, www.an-mc.net)
I realize Cauldron/Bukkit is a complete mess, and the project is now nearly 10 months dead. But I need some help with "cauldron-1.7.10-1.1240.06.213-server.jar".
The world item AWS remover is causing a Phoenix Reborn server to crash repeatedly with concurrency errors, typically involving ChickenChunks. If I don't do world item restrictions, these errors don't happen.
Should I temporarily disable all chunkloaders until Item Restrict has cleansed the world, and then disable world item restrict before re-enabling chunkloaders?
@Wavef0rce
World specific bans are enforced through world specific permission nodes. So, yes there is if your permissions plugin supports it. GM and PEX do world specific permission nodes.
@krisdestruction
I do, but I just think it would be easier to use the commands :3.
@time6628
Please use the config file instead.
Hello, The commands do not work. They aren't "ires" + "ban" instead they are "ires ban" as in one whole command.
@TrollulzPvP
Yes, if you have the permissions system to do it. If your permissions system has a way to only allow a permission node for a certain world and rank, then you set the permission node there. From what I remember using PEX, you should be able to do it.
Basically put an item ban in the config and give the world and rank combo an exception.
Great plugin, works lovely, however I just have a question, is it in any way possible to ban a certain item, from certain worlds for certain ranks?
Like for example, I'd like to ban Ender Quarry from the overworld (world) but not from the mining world on the server (Mining), and I don't want most ranks to have permission to it, only a few of them.
For example, I don't want the Settler rank to have permission to it, but the Member rank should, so I get that I can add the permission node to the Settler, but that'd grant it access in all the worlds on the server.
Also, using PermissionsEx, if that's of any need.
@TheOnlyRealTGS
Not at this time, no.
@krisdestruction
Is it possible to remove only a item with a special name? (Like a diamond sword with the name §6Hi)
@Nentify
Instead, please use the config file and /ires reload to reload the config file. I realize the command isn't perfect :(
To whoever who just donated to me, feel free to PM me and I can add you to the supporter's list :)
@iampyrex
If 1198 has subIDs, try doing 1198-0, 1198-1, etc. and just exclude 1198-8
Say I want to world ban 1198, but not 1198-8. How would I go about doing this. Currently the 1198 is removing all sub id items as well.
@Nentify
Only the /ires reload command work in current version
When I use /ires ban ownership <id>, it just prints "/ires" in chat and nothing appears to change... Is this normal?
@LemADEC
Unfortunately I haven't made an update recently due to the bukkit staff leaving and I don't plan to. However if I do release another update, I will look into it.
@krisdestruction
I agree that bukkit function is useless with Forge since it's just an enumerated integer. Could we use Java getClassName() or something alike instead? Otherwise, we could use a Forge mod to get the names and push the IDs to the plugin?