I was planning on making a sword (The Eyelander from TF2), and I understand how to track kills and add health boosts, but I have a problem (like most people). I can't figure out how to make it so that when the sword is held in a hand, it cause an event such as text or particles to appear.Help would be greatly appreciated.
I think this is the easiest way, if not someone please correct me.. but, you have to test if a player is holding an item, and if its in that slot, so you have to test every couple seconds for this command -
Thanks
-Imagination987
/testfor @p {Inventory:[{id:minecraft:golden_sword,Slot:0b,display:{Name:"Eyelander"}}],SelectedItemSlot:0}
/testfor @p {Inventory:[{id:minecraft:golden_sword,Slot:1b,display:{Name:"Eyelander"}}],SelectedItemSlot:1}
/testfor @p {Inventory:[{id:minecraft:golden_sword,Slot:2b,display:{Name:"Eyelander"}}],SelectedItemSlot:2}
and so on... till 8, replacing the 'slot' and 'selecteditemslot', but leaving the 'b' there after '2b' and so on.
then you can use comparators on that, and then cause an output, like /say or /particle commands
Thanks for the info.