EquipControl
EquipControl
Important
The config layout has changed in 0.4. If you update from a lower version, you need to update your config as well.
Read here for further details.
Summary
EquipControl let's you control which weapons/armor a player can use via Permissions.
You can define which items are checked, what makes this plugin as dynamic as possible.
As of 0.4 you can also restrict the use of named weapons/armor.
Usage
When using a weapon without the permissions, it will not deal any damage.
When wearing a forbidden armor it will moved into the player's inventory after closing it. If it's full the armor will be dropped.
Permissions
Armor Permissions:
equipcontrol.armor.<id>
equipcontrol.armor.<material>
equipcontrol.armor.<material|id>.<nametag>
Weapon Permissions:
equipcontrol.weapon.<id>
equipcontrol.weapon.<material>
equipcontrol.weapon.<material|id>.<nametag>
<id> is the ID of this Item, <material> is the material name defined in bukkit.
<nametag> is the key, used in config, to identify restricted Itemnames.
You can find a list here: Link (1.1)
Config
Only Item-IDs are allowed.
Nametags/keys must be unique in every item but can be duplicated in different items.
IMPORTANT If you use formated item names (like color), you NEED to specifiy the format code in the item name. (ยง<code>)
To add Items without name restriction, put them under the list: section.
For items with name restriction create a new section
<id>: <nametag1>: "<name of the item>" <nametag2>: "<name of the item>" <nametagX>: "<name of the item>"
Default config:
checked_weapons: list: - 267 - 268 - 272 - 276 283: nametag: "Thors Hammer" checked_armor: list: - 299 - 300 - 301 298: namekey: "Just a Hat" string: weapon: "You don't have the needed permissions to use this weapon" helmet: "You don't have the needed permissions to wear this helemet" chest: "You don't have the needed permissions to wear this chestplate" leggings: "You don't have the needed permissions to wear this leggings" boots: "You don't have the needed permissions to wear this boots" namedarmor: "You don't have the needed permissions to wear %item%" namedweapon: "You don't have the needed permissions to use %item%" CheckArmorOnDamage: false CheckArmorPeriodical: false CheckArmorTimer: 30 #time in seconds useItemName: false
Source
Get the source on GitHub
I first put them in default so that nobody is able to use those items, then down at bottom I am trying to give them back to the warrior... the plus I added in later to see if it worked. I've had it like this also
- equipcontrol.armor.302
I only used the + because it stopped working and thought maybe that was a problem. :\ here is the config:
checked_weapons:
list:
- 258
- 261
- 267
- 268
- 286
- 272
- 276
- 279
- 283
checked_armor:
list:
- 298
- 299
- 300
- 301
- 302
- 303
- 304
- 305
- 306
- 307
- 308
- 309
- 310
- 311
- 312
- 313
- 314
- 315
- 316
- 317
string:
weapon: "You don't have the needed permissions to use this weapon"
helmet: "You don't have the needed permissions to wear this helmet"
chest: "You don't have the needed permissions to wear this chestplate"
leggings: "You don't have the needed permissions to wear this leggings"
boots: "You don't have the needed permissions to wear this boots"
namedarmor: "You don't have the needed permissions to wear %item%"
namedweapon: "You don't have the needed permissions to use %item%"
CheckArmorOnDamage: true
CheckArmorPeriodical: true
CheckArmorTimer: 10
useItemName: false
UPDATE:
I stopped negating the permission from default, and only left the permission nodes for Warrior and it works... :) Thank you.. I didn't know I didn't have to negate. duh. TY TY
@msilver6677
You shouldn't have to negate the permissions. If you put the ids in the config the plugin will automaticly block these items and only allow them when you have the permission.
I guess the "- +<permission>" syntax is part of groupmanager, because I've never seen it before^^
Could you post your config.yml of my plugin? Maybe I find an error there...
Please look below when you get a chance and tell me what I may or maynot be doing wrong... :( I had it working... then it just stopped all of a sudden. :\
# Group inheritance
#
# Any inherited groups prefixed with a g: are global groups
# and are inherited from the GlobalGroups.yml
#
# Groups without the g: prefix are groups local to this world
# and are defined in the this groups.yml file.
#
# Local group inheritances define your promotion tree when using 'manpromote/mandemote'
groups:
Default:
default: true
permissions:
- -bukkit.command.kill
- essentials.protect.damage.drowning
- essentials.protect.damage.fall
- essentials.protect.damage.fire
- essentials.protect.damage.lava
- -mcmmo.ability.all
- -mcmmo.skills.all
#
#Armor Restrictions
#
#Leather
- -equipcontrol.armor.298
- -equipcontrol.armor.299
- -equipcontrol.armor.300
- -equipcontrol.armor.301
#Chain
- -equipcontrol.armor.302
- -equipcontrol.armor.303
- -equipcontrol.armor.304
- -equipcontrol.armor.305
#Iron
- -equipcontrol.armor.306
- -equipcontrol.armor.307
- -equipcontrol.armor.308
- -equipcontrol.armor.309
#Diamond
- -equipcontrol.armor.310
- -equipcontrol.armor.311
- -equipcontrol.armor.312
- -equipcontrol.armor.313
#Gold
- -equipcontrol.armor.314
- -equipcontrol.armor.315
- -equipcontrol.armor.316
- -equipcontrol.armor.317
#
#Weapon Restrictions
#
#Bow
- -equipcontrol.weapon.261
#Iron Axe
- -equipcontrol.weapon.258
#Iron Sword
- -equipcontrol.weapon.267
#Diamond Sword
- -equipcontrol.weapon.276
#Diamond Axe
- -equipcontrol.weapon.279
#Gold Sword
- -equipcontrol.weapon.283
#Gold Axe
- -equipcontrol.weapon.286
inheritance:
- g:groupmanager_default
- g:bukkit_default
- g:essentials_default
- g:towny_default
info:
prefix: '&e'
build: false
suffix: ''
Owner:
default: false
permissions:
- -vanish.*
- '*'
inheritance:
- admin
info:
prefix: '&4'
build: true
suffix: ''
Builder:
default: false
permissions: []
inheritance:
- default
- g:essentials_builder
- g:towny_builder
info:
prefix: '&2'
build: true
suffix: ''
Moderator:
default: false
permissions: []
inheritance:
- builder
- g:groupmanager_moderator
- g:bukkit_moderator
- g:essentials_moderator
- g:towny_moderator
- g:vanish_moderator
info:
prefix: '&5'
build: true
suffix: ''
Admin:
default: false
permissions: []
inheritance:
- moderator
- g:groupmanager_admin
- g:bukkit_admin
- g:essentials_admin
- g:towny_admin
- g:vanish_admin
info:
prefix: '&c'
build: true
suffix: ''
#
#Races
#
Elf:
default: false
permissions:
- -bukkit.command.kill
- magicspells.grant.haste
- magicspells.grant.tree
inheritance:
- default
- g:essentials_builder
- g:towny_builder
info:
prefix: '&2[Elf]'
build: true
suffix: ''
Demon:
default: false
permissions:
- -bukkit.command.kill
- -essentials.protect.damage.fire
- -essentials.protect.damage.lava
- magicspells.grant.firenova
inheritance:
- default
- g:essentials_builder
- g:towny_builder
info:
prefix: '&6[Demon]'
build: true
suffix: ''
#
#Classes
#
Warrior:
default: false
permissions:
- mcmmo.ability.axes.all
- mcmmo.skills.axes
#
#Armor Restrictions
#
#Leather
- +equipcontrol.armor.298
- +equipcontrol.armor.299
- +equipcontrol.armor.300
- +equipcontrol.armor.301
#Chain
- +equipcontrol.armor.302
- +equipcontrol.armor.303
- +equipcontrol.armor.304
- +equipcontrol.armor.305
#Iron
- +equipcontrol.armor.306
- +equipcontrol.armor.307
- +equipcontrol.armor.308
- +equipcontrol.armor.309
#Gold
- +equipcontrol.armor.314
- +equipcontrol.armor.315
- +equipcontrol.armor.316
- +equipcontrol.armor.317
#Diamond
- +equipcontrol.armor.310
- +equipcontrol.armor.311
- +equipcontrol.armor.312
- +equipcontrol.armor.313
#
#Weapon Restrictions
#
#Bow
- +equipcontrol.weapon.261
#Iron Axe
- +equipcontrol.weapon.258
#Iron Sword
- +equipcontrol.weapon.267
#Diamond Sword
- +equipcontrol.weapon.276
#Diamond Axe
- +equipcontrol.weapon.279
#Gold Sword
- +equipcontrol.weapon.283
#Gold Axe
- +equipcontrol.weapon.286
inheritance:
info:
prefix: ''
build: true
suffix: '&6[Warrior]'
@SydMontague
Thank you so much SydMontague. I appreciate the fast response.
@DyreCraft
I've added this config nodes in order to fight this issue:
I'll add a better check in the next version - but I'm currently working on a lot of other plugins, so I can't give a ETA...
So - I have chain armor blocked on the server (its a donation ability) and all has worked wonderfully until a player found a loop-hole. If the player is holding the chain armor in their hand and then they right click - it completely bypasses the plugin permission checks. Is there a way to make it to where they can't force equip armor?
@SydMontague
Of course *hits self in head* Thank you :D I must've been too tired to see it haha
@jnoshima
Your indentation is wrong. The default node from Squire to Paladin have to much spaces before them, remove them so that they align with the permissions node, and it should work.
I'm getting an error from Group Manager when I put in my equipment control permissions
here is the error: http://pastebin.com/d4tNCmA5
and my groups page http://pastebin.com/Y1Bs3kmr
it only happened after I put in my equipment checks have I done something wrong?
I am using an MCPC build and find it might not sensitive enough, even i set time checking period as 15 second. Hope some improve :P
@donsavage1
Yes, the plugin supports bows.
I'll look into blocking tools and other stuff as well when I start a rework of this plugin.
Will the weapon check stop players from shooting bows?
Also... Could you add the ability to block tools from being usable? I'd like a way to globally block the use of a tool, such as a diamond sword, to everyone except players who have a permission node to exempt them from that specific tool.
@DyreCraft @sideshowsam
Seems strange, based on the code it shouldn't happen. I'll look into it.
@sideshowsam
Same issue - weapons list is empty but players still can't use swords...
@sideshowsam
The plugin should only check items, which are in the list. If the list is empty, it should prevent no item as weapon...
Even though my checked_weapons list is empty, it is blocking all players from using any kind of sword. Any way around this other than giving them all the permission to use each sword?
@alexk252
The plugin should work with 1.5.2. However, if you occur an error, please report it.
@Mickkas
Sorry for the late answer. I'll look into wildcards. However, I'm currently working on a bunch of other plugins I need to finish first.
Update to 1.5.2 please!
I'll split this into a new post. You responded while I was adding another question to my last post, lol.
Does this support wildcards for item name checks?
Such as 352: wand: "*(Wand)*" So a player could have the equipcontrol.weapon.*.wand permission and be able to use any weapon that had (Wand) in the name.
edit:
After a bit of testing it appears that it does not support wildcards in the item names.
@Mickkas
The plugin is atm. only able to check the name of items, but not it's Lore.