Question Questions regarding custom item creation.

KianFakheriAghdam

New member
Jan 4, 2024
2
0
1
I've added a knife item to my plugin but I have a couple of issues.

I needed an unstackable item with durability. I've seen a lot of people use a carrot on a stick, but that attracts pigs; So I went with a wooden sword. Was there a better item I could've used?

A wooden sword's durability is 60, but I need mine to be only 16. I've damaged the item to 16, but I wouldn't like the tool to look broken & it can be repaired with planks. Is there anyway to modify the max durability of an item?

I want to remove the sweeping effect of the sword.

I wanted it to have the same attack speed as a normal item; So I added an attribute modifier that sets it to 4.0 (What I at least think is the attack speed of hands), but it now says "+ 4 Attack Speed" in the tool tips. I at first wanted to go with itemMeta.removeAttributeModifier(Attribute.GENERIC_ATTACK_SPEED), but that removes the attribute modifiers & not the attributes set up by the game itself.
 
Version Output
[00:19:48 INFO]: This server is running Paper version git-Paper-370 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 1fa48d1)
You are 5 version(s) behind
Download the new version at: https://papermc.io/downloads/paper