So what happens, is that I get that item, and I'm supposed to poison someone. When I use it for the 1st time, it works. Once I use it and the durability goes down, it stops poisoning people. So how do I make it unbreakable / usable after getting it's durability down?
Here's my code:
Here's my code:
Code:
on load:
set {mieczzatrucia} to diamond sword with custom model data 1 named "&x&2&5&6&C&0&3&lZ&x&2&A&7&3&0&7&la&x&2&F&7&9&0&B<&x&3&3&8&0&0&F&lr&x&3&8&8&6&1&3&lu&x&3&D&8&D&1&7<&x&4&2&9&3&1&B&le &x&4&6&9&A&1&E&lO&x&4&B&A&0&2&2&ls&x&5&0&A&7&2&6<&x&5&5&A&D&2&A&lr&x&5&9&B&4&2&E&lz&x&5&E&B&A&3&2&le" with lore "&7" and " &2» &aPo uderzeniu masz 50%%" and " &2» &ana otrucie przeciwnika"
options:
admingui: &2Przedmioty admina
permisja: jakub-core-admin
brak-permisji: &2Nie posiadasz permisji &ajakub-core-admin
command /items:
permission: {@permisja}
permission message: {@brak-permisji}
aliases: itemyadmina,adminitems,ai
trigger:
set {_admingui} to a new chest inventory with 2 rows with name "{@admingui}"
open {_admingui} to player
set slot 0 of {_admingui} to {mieczzatrucia}
on damage:
if attacker's tool is {mieczzatrucia}:
chance of 50%:
apply poison to victim for 15 seconds
send actionbar "&aOtrułeś przeciwnika" to attacker
send title "&aZOSTAŁEŚ OTRUTY" to victim for 1 seconds with fadein 1 second and fade out 1 second
play sound "ENTITY_WITCH_HURT" with pitch 1 to victim