NoItem
NoItem v3.1.0 - DERP.
What does it do?
NoItem aims to allow server admins to restrict almost any aspect of players actions via permissions. Things such as placing and breaking blocks, interacting with levers and buttons, opening chests and furnaces, even breeding animals can be controlled! There are of course other things that can be restricted as well. For a complete list, check the wiki!
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
Downloads:
http://dev.bukkit.org/server-mods/noitem/files/
Beta/Development builds may contain bug fixes, but also may contain new bugs
So before you report a bug, check and see if a new build has fixed it!
Feature List
NoItem can restrict the following:
- Crafting certain items
- Holding certain items
- Having certain items
- Brewing certain potions
- Cooking certain items
- Picking up certain items
- Dropping certain items
- Placing certain blocks
- Breaking certain blocks
- Wearing certain armors
- Interacting with certain items / entities in general
- Left clicking certain items / entities
- Right clicking certain items / entities
- Using certain tools. (right click / left click / in general)
Commands
Command | Permission | Description |
---|---|---|
/noitem | noitem.admin | Prints current NoItem version |
/noitem reload | noitem.command.reload | Reloads the configuration |
/noitem debug toggle | noitem.command.debug.toggle | Toggle debugging |
/noitem debug dump | noitem.command.debug.dump | Write debug file to the servers base directory |
Videos
FAQ
Q: How do I...
A: Check the wiki! If you are still confused and have tried to figure it out, ask in the comments.
Q: There is an error in the console or something is not working as expected
A: Submit a bug report to github! (Link above) DO NOT post the error in the comments section! Also be sure to include the error in your report.
This plugin utilises Hidendra's plugin metrics system, which means that the following information is collected and sent to mcstats.org:
- A unique identifier
- The server's version of Java
- Whether the server is in offline or online mode
- The plugin's version
- The server's version
- The OS version/name and architecture
- The core count for the CPU
- The number of players online
- The Metrics version
Opting out of this service can be done by editing plugins/Plugin Metrics/config.yml and changing opt-out to true.
NoItem 4.X - It's Aliiiveeee!
NoItem 4.X is currently in development and is not finished. There will be bugs, there will be a lack of certain features, there will be questions.
Here is the link to the information page: https://github.com/nala3/Noitem4/wiki
Here is the link to the development builds: http://ci.worldoftomorrow.net/ (Also on the wiki page)
Submit bug reports to the github bug tracker.
Currently known issues are:
- None - Please report any found!
Currently Implemented Features (also their permissions)
- break
- place
- craft
- open
- cook
- pickup
- drop
- hold
- interact.object
- interact.entity
- use - is buggy and needs refinement
Permissions format:
- noitem.action.<action>.<object>[.secondaryValue]
- noitem.object.<object>[.secondaryValue].<action>
- Asterisk values are supported for specific actions and objects. not for all actions or objects at once. (e.g. noitem.action.* is not supported, but noitem.action.break.* is)
I am open to suggestions on what other action to implement on top of the ones I am currently working on.
A wild button appears!
You use "CLICK". Its super effective!
@pepper82
Only took me 15 days because my PC has been broken but yes, I fixed it haha.
For some reason, after I installed the plugin and tried to do /noitem, it said that I am "Not allowed to run that command." I have the star node permission as well as the custom permissions attributed to it. Is there something I was doing wrong?
I am on version 1.7.9, if that's what the problem is.
doesn't work im using these perms
noitem.nocraft.116
noitem.nocraft.379
noitem.nocraft.310
noitem.nocraft.311
noitem.nocraft.312
noitem.nocraft.313
noitem.nocraft.314
but players can still craft these items
I can not download 4.x versions because the website is offline:
"502 Bad Gateway"
Can you fix it?
Interesting, they all work for me. You should note that the permission format has changed from 4.x to 3.x so you should read the documentation for it.
@nala3
I tried using a 4.X version originally, but absolutely none of the permissions would work, and my comment requesting help didn't get responded to.
@My_Name_Was_Stolen
First, I would recommend using a 4.X development build, as features in 3.x are no longer maintained by myself.
With 4.X, you can stop chest opening with "noitem.object.chest.open"
For the interacting, well you could try not letting them hold the item. I only say this because I have not yet implemented interact for entities, but it is planned. (Not an ideal solution, but I'm working on things and taking suggestions and ideas). Crops, i'm not sure. I haven't really try that yet. Eggs, again haven't tested it.
Gah, I need to have a list of things to do, it'll be a mile long but hey, it gives me something to do.
Is there a way to do the following things?
Prevent Breeding Of Animals without using the noitem.nointeract.(animalname) as this prevents usage of leads, and prevents riding of horses. I tried using noitem.nointeract.(item require for breeding) and noite.nouse.(item required for breeding) but neither seem to work.
Prevent planting of crops I tried noitem.nointeract.(crop) and noitem.nouse.(crop)
Prevent Throwing of Eggs using noitem.nouse.344 does not work.
Preventing opening of chests with noitem.nointeract.54 doesn't work, but noitem.nointeract.54.* does, though only when the hand is empty. (Meaning all the player has to do to bypass the restriction is hold an item in their hand)
Also, this method works for all things with inventories except hopper minecarts, and chest minecarts.
Preventing use of fishing pole works with noitem.nouse.346 but only when right clicking on a block. If the player just looks at air and right clicks, they can cast fine. I can use noitem.nohold.346 but it is not ideal.
I'm using version 3.1.2 on a bukkit version 1.7.9 Beta R0.1
@lANTHONYl
With a large amount of code and effort :P
You can stop interaction with blocks at the moment (e.g. buttons, doors, chests). So the "use" option would be implemented specifically to stop you from, for example, using a diamond pickaxe to break things, but an iron pickaxe is fine. You can already mostly achieve this with the "hold" permission, but I understand it may not be ideal.
@nala3
How does WorldGuard implement its item usage prevention? It works pretty well...
@pepper82
It is buggy because "using" something is not a clearly definable term and is therefore hard to implement in such a way that it works quite right because each item is used in a different way and even can change depending on they click (e.g. shears). I could make it apply to only tools to limit special cases I need to check I suppose :P Anywho, use is not currently disabled in 4.X pending changes; however a just as effective solution is to stop them from holding the item!
Enchanting, yes but again is tricky to implement. Maybe I just to talk it over with myself like a crazy person, that helps sometimes.
"For example: Blacksmiths will be able to smelt, but Warriors will not be able to smelt items etc." That is exactly what I originally created this plugin for on my own server! And PEX shouldn't be an issue.
Sounds good :-)
Will you be able to add options for controlling the enchanting of items?
Why is "use" buggy? Will you be able to fix it?
I am really going to use your plugin on my upcoming rpg server but I really need to be sure that performance won't be an issue here.
I think I will enable all actions for all groups by default and just deactivate the actions for specific user groups.
For example: Blacksmiths will be able to smelt, but Warriors will not be able to smelt items etc.
I am using PermissionsEx - is that any problem?
@pepper82
Well, I honestly haven't tested it on that large of a scale, however I would definitely be willing to help you with any performance issues. The checks are performed upon every action. I had a permission caching system in place to reduce system strain, however it did not seem beneficial in most cases so I commented out the caching code for now. A normal permission plugin should have all of the permissions loaded anyway, so the only overhead for a permission check would be a list or hash table look up which is minuscule.
As for the reload command, that originally was for reloading a player cached permissions, but since I removed that functionality, it no longer does anything. I just haven't gotten around to a configuration reload command, but it wouldn't be too hard to do.
What about performance on a 50 - 100 player server? Should this be any problem at all? How often are these checks performed?
Oh and I am trying the latest dev build 4.x but the reload command for the config does not seem to work (/noitem reload) ?
I'm using the latest development version of the plugin (4.X) With Bukkit 1.7.9 R0.1, and none of my permissions seem to be working. Here's a copy of my permissions file.
http://hastebin.com/imozajirut.apache
It's suppose to deny the ability to do those things, unless they are part of the specific permission group. I don't expect you to know how my permission plugin (PEX) works, but did I make the permission nodes themselves correct?
@Bow_Boss
Please do not post full error logs to the comments. Use a tool such as pastebin (or if you're a hipster, hastebin) to create a link to the error. You also fail to mention of your server environment such as your server version. Please create a bug report on Github (the PROPER place to make bug reports, NOT in the comments)
[21:43:42 ERROR]: Could not pass event InventoryClickEvent to NoItem v3.1.0 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:294) [Spigot.jar:git-Spigot-1387] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav a:62) [Spigot.jar:git-Spigot-1387] at org.bukkit.plugin.TimedRegisteredListener.callEvent(TimedRegisteredLi stener.java:30) [Spigot.jar:git-Spigot-1387] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j ava:502) [Spigot.jar:git-Spigot-1387] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j ava:487) [Spigot.jar:git-Spigot-1387] at net.minecraft.server.v1_7_R2.PlayerConnection.a(PlayerConnection.java :1403) [Spigot.jar:git-Spigot-1387] at net.minecraft.server.v1_7_R2.PacketPlayInWindowClick.a(SourceFile:32) [Spigot.jar:git-Spigot-1387] at net.minecraft.server.v1_7_R2.PacketPlayInWindowClick.handle(SourceFil e:10) [Spigot.jar:git-Spigot-1387] at net.minecraft.server.v1_7_R2.NetworkManager.a(NetworkManager.java:148 ) [Spigot.jar:git-Spigot-1387] at net.minecraft.server.v1_7_R2.ServerConnection.c(ServerConnection.java :77) [Spigot.jar:git-Spigot-1387] at net.minecraft.server.v1_7_R2.MinecraftServer.v(MinecraftServer.java:7 05) [Spigot.jar:git-Spigot-1387] at net.minecraft.server.v1_7_R2.DedicatedServer.v(DedicatedServer.java:2 73) [Spigot.jar:git-Spigot-1387] at net.minecraft.server.v1_7_R2.MinecraftServer.u(MinecraftServer.java:5 68) [Spigot.jar:git-Spigot-1387] at net.minecraft.server.v1_7_R2.MinecraftServer.run(MinecraftServer.java :474) [Spigot.jar:git-Spigot-1387] at net.minecraft.server.v1_7_R2.ThreadServerApplication.run(SourceFile:6 18) [Spigot.jar:git-Spigot-1387] Caused by: java.lang.NoClassDefFoundError: org/bukkit/craftbukkit/v1_7_R1/invent ory/CraftItemStack at net.worldoftomorrow.noitem.util.NMSMethods.getPotionResult(NMSMethods .java:11) [?:?] at net.worldoftomorrow.noitem.events.Handlers.handleNoBrewInvClick(Handl ers.java:280) [?:?] at net.worldoftomorrow.noitem.events.Listeners.onInventoryClick(Listener s.java:67) [?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.7.0 _45] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [?:1.7.0 _45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [?:1 .7.0_45] at java.lang.reflect.Method.invoke(Unknown Source) [?:1.7.0_45] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:292) [Spigot.jar:git-Spigot-1387] ... 14 more Caused by: java.lang.ClassNotFoundException: org.bukkit.craftbukkit.v1_7_R1.inve ntory.CraftItemStack at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:67) [Spigot.jar:git-Spigot-1387] at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader. java:62) [Spigot.jar:git-Spigot-1387] at java.lang.ClassLoader.loadClass(Unknown Source) [?:1.7.0_45] at java.lang.ClassLoader.loadClass(Unknown Source) [?:1.7.0_45] at net.worldoftomorrow.noitem.util.NMSMethods.getPotionResult(NMSMethods .java:11) [?:?] at net.worldoftomorrow.noitem.events.Handlers.handleNoBrewInvClick(Handl ers.java:280) [?:?] at net.worldoftomorrow.noitem.events.Listeners.onInventoryClick(Listener s.java:67) [?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.7.0 _45] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [?:1.7.0 _45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [?:1 .7.0_45] at java.lang.reflect.Method.invoke(Unknown Source) [?:1.7.0_45] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:292) [Spigot.jar:git-Spigot-1387] ... 14 more
Trying to block brewing of strength potions with PEX permission:
noitem.nobrew.16.377
Okay so now none of the permissions are working, and idk why, i'm using CrakftBukkit 1.7.2 with the 1.7.2 NoItem..
@lANTHONYl
Thanks! So if I wanted to not let someone have spawn eggs in there inventory i'd add "noitem.nohave.383", would I have to put each data number for each spawn egg? Basically 1 permission per egg.
@Shahblox
you also need noitem.nointeract.54