Solved How to add attack damage on sword

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.
Oct 10, 2021
12
0
1
23
I have been trying to make a sword with custom attack damage, but it I can't figure out how to make it work.
I have tried giving it a nbt, but it doesn't work. This is my code
Code:
command /kingsword:
  trigger:
    give player a Unbreakable iron sword named "<blue>King's sword"
    add to last given nbt "{Unbreakable:1,AttributeModifiers:[{AttributeName:"generic.attack_damage",Amount:11,Slot:mainhand,Name:"generic.attack_damage",UUID:[I;-121912,29295,214724,-58590]}],HideFlags:6}"
:
 
I have been trying to make a sword with custom attack damage, but it I can't figure out how to make it work.
I have tried giving it a nbt, but it doesn't work. This is my code
Code:
command /kingsword:
  trigger:
    give player a Unbreakable iron sword named "<blue>King's sword"
    add to last given nbt "{Unbreakable:1,AttributeModifiers:[{AttributeName:"generic.attack_damage",Amount:11,Slot:mainhand,Name:"generic.attack_damage",UUID:[I;-121912,29295,214724,-58590]}],HideFlags:6}"
:
You need skbee and use
Code:
give player iron sword named "King's sword" with nbt "{Unbreakable:1,AttributeModifiers:[{AttributeName:""generic.attack_damage"",Amount:11,Slot:mainhand,Name:""generic.attack_damage"",UUID:[I;-121912,29295,214724,-58590]}],HideFlags:6}"
 
Status
Not open for further replies.