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 just tested it again and it worked like intended. equipcontrol.weapon.<id> allows every weapon, except the ones specified with nametags. equipcontrol.weapon.<id>.<nametag> allows only the weapon with the specified name
So I think it's a problem with your config - whats the exact name of the item (with format, it's very important) - the part of your config - the part of your permissions
any possible way to update this plugin so that it reads the item and the item when it's named seperately so that it's a heck more simpler to do instead of only being able to use all swords or just the named swords of that type? or does it do that already and i'm just an idiot?
UGH! Gotta go to work... hopefully i can get this sorted out...
@gameroy8
I'll PM you the link to a really good plugin for doing that sort of thing. I don't want to get in trouble here for advertising.
@artlune
i'm not so worried about players not being able to use own anvil named weapons, i just want to be able to use wooden sword but not Farshaker as a default user.
I still can't get it to work because im not sure how you actually named your item...
@artlune
I use bukkit plugin NBTedit to change names of items. how would i set a wood swords name to be in green and say Farshaker?
@gameroy8
Ok I finally got it to work. This works for my setup so make sure you are getting your names correct. Use this config as a template.
In this example, I have an item generated named "&aFarshaker". Its name is displayed in green text and the &a is not visible. Give your default users this permission "equipcontrol.weapon.268". They will be able to use wooden swords but not wooden swords named "&aFarshaker" because they don't have the permission. You do not need a negated permission for the nametag item. I just tested this and it works.
Give your premium users these permissions in order to use both wooden swords and ones named Farshaker "equipcontrol.weapon.268" and "equipcontrol.weapon.268.farshaker".
Make sure EquipControl is reading the name of the item correctly. If the text "Farshaker" is in white and italics, you would probably use "farshaker: "§lFarshaker". Hope this helps! :)
Edit:
This doesn't work quite as well as I had hoped. We run into the same issue as before where you can't use items renamed at an anvil until you add them to the list of nametags.okay, so now it's not even checkin the names im pretty sure because i have the permission for nametag1 only, and can neither use nametag1 item or default wooden sword.
If someone can get this configured on a test server and get it working and tell me how it's done, would be great
now i removed permission for 268, and only added the permission for 268.nametag1
and i cant use Farshaker OR a normal wooden sword...
I'm so confused and really need this to work...
@gameroy8
I hope you test it without op. Usually the plugin should do exactly what you want...
I used negated permissions.
maybe im getting the wrong idea about what this plugin does...
i have permission for item 268 i do not have permission for item 268.nametag1 nametag1 is Farshaker
for some reason i can use ANY WEAPON. I DO NOT want to be able to use Farshaker, but be able to use a normal wooden sword. Help?
@artlune
So, i can't have it to where everyone can use wood stone iron gold and diamond swords, but only premium can use the defined weapons such as Farshaker?
The reason being is that i want to allow everyone to have default weapons, and be able to name their own weapons and add their own enchants, BUT I want to RESTRICT permission so that only PREMIUM ACCOUNTS can use default items and the checked items in configuration because those items will have enchantments that are OVER THE NORMAL LIMIT.
please let me know if this is possible.
@artlune
I´ll look into the spam protection.
However, the plugin will not allow the weapon in anyway.
equipcontrol.weapon.<id> - will allow this item equipcontrol.weapon.<id>.<namekey> - will allow only this item with this namekey
I think I need to refactor the plugin a bit. ;)
@SydMontague
It should send the string every 5 seconds or so if they are continuously trying to hit with it. It should not send the message more than once every 5 seconds in my opinion.
I didn't have the permission for an iron axe and was hitting with it until it broke. That is why I mentioned something.
@gameroy8
Have you tried it with negated permissions?
- -equipcontrol.weapon.268.nametag1 - equipcontrol.weapon.268
This should allow every item with id 268 but not Farshaker
This is starting to bug me.
in my config i have a weapon
268: nametag1: "Farshaker"
in permissions i have every weapon enabled but not any permissions with nametags.
when i use Farshaker in game, i can use it, how do i get it that i can use any other weapon but restrict Farshaker?
i'm really confused and i need this fixed for my premium accounts.
@artlune
How do you imagine an anti spam function?
Durability should not be decrased when using weapons without permission. However, the client will think so, and decrase the durability bar until the client and server sync this itemslot/inventory.
Could you add an anti-spam function when sending the strings when you don't have the permissions? Also could it possibly not use durability when this happens as well?
@artlune
I just tested it and it showed me the string for named items. My only guess is that your item got another name than specified in config. Maybe the item got another color than §9 (Blue)?
@jajamic
I´m sorry, I don't exactly understand what you mean...
I can not understand my mistake no swords can not be used. And all armor can be worn.
I wish they could have used only the name of the armor. And I do not understand should added permissions?
I show you my file:
http://pastebin.com/QnegNimW
Thx
thanks very much,