World-of-Tomorrow / NoItem

5 stars 16 forks source link

Data values not being recognized with 2.0.6 or 2.0.7b2 #45

Closed keenerb closed 12 years ago

keenerb commented 12 years ago

PermissionsBukkit 2.0 NoItem 2.0.6/2.0.7B2 Tekkit 3.1.2

skuli_steinulf: groups:

I can not hold a fully repair wooden sword, I CAN hold a damage wooden sword.

skuli_steinulf: groups:

I can hold either a fully repaired wooden sword or a damage wooden sword.

nvx commented 12 years ago

From the looks of it, noitem.nohold.268.all is the permission node that achieves what you want.

I suggest for the sake of intuitiveness that noitem.nohold.268.* to be aliased to noitem.nohold.268.all, as well as defining the behaviour of an omitted data value a little more clearly in the docs. I personally (before checking the code) was under the impression that noitem.nohold.268 behaved as noitem.nohold.268.all did, when in fact it seems to behave as noitem.nohold.268.0, which isn't exactly the most intuitive (hey, if I'm banning a sword, I'd expect to ban all of the sword!).

just-push-it commented 12 years ago

I may very well alias that permission, as would probably be a good thing to do. However about the permission not being very intuitive for data values, I have no way to detect that something is a tool or block. Therefore I just assume everything is a block because that works out better in most cases. Because with Tekkit especially, item data values make all the difference. So if it worked the way you are suggesting noitem.nohold.128 would block all sub-values of 128, which is like 10 or so different items. It is easier just to add .all for tools, etc... where needed.

nvx commented 12 years ago

Well anything over 4096 is definitely an item ;), but I do see your point. Perhaps just documenting the behaviour of omitting the data value a little more clearly would be an idea instead.

just-push-it commented 12 years ago

Indeed, I shall change the permissions page to reflect this a bit better.

just-push-it commented 12 years ago

Okay, I updated the permissions page to hopefully clarify a bit more on how data values work and are used by NoItem. https://github.com/nala3/NoItem/wiki/Permissions