PEXPlugins / Modifyworld

Restriction plugin for Bukkit. Part of PermissionsEx bundle.
36 stars 38 forks source link

Material names containing an underscore are not recognized when assembled into the permission #89

Open FrancescoDeSa opened 10 years ago

FrancescoDeSa commented 10 years ago

After several hours of testing to understand why modifyworld was not preventing certain players from accessing the brewing stand (BREWING_STAND) and the enchantment table (ENCHANTMENT_TABLE), I finally found that the underscore in the material name was not recognized by the assembling method, because if you access the "name" field of the material enum, it returns the name with a space instead of an underscore. I fixed it using the PEX regex feature, writing them as

items.use.*.on.block.(enchantment*table)

and

items.use.*.on.block.(brewing*stand)

so they would match the space between the 2 words, but I think this issue should be properly fixed.

socram8888 commented 10 years ago

I can not reproduce this issue using the current code on this repository:

[00:00:50] [Server thread/INFO]: [PermissionsEx] User socram8888 checked for permission 'modifyworld.items.use.brewingstanditem.on.block.brewingstand', regex-matched a value of true from * (CACHE MISS)