1

I wanna know how to kill specific modded items if the item has a color code name, like in this case it's called Katana Kuzanagi (the kuzangi part is red).
I tried doing §4 to make it red but that doesn't work.

The command I'm using is

/kill @e[type=item,name="Katana Kuzanagi"]

The item name1

4
  • 2
    What part doesn't work? The making it red? The detection of the red text part? Could you add the commands you've actually tried, not the shortened one? And also show us, through a picture or similar, how what the item name looks like? And maybe also what add-on it's from?
    – Plagiatus
    Commented Feb 10, 2023 at 8:27
  • 1
    You're missing a bracket in the command. I don't know if this will change anything though. /kill @e[type=item,name=(Item name)]
    – Blue Robin
    Commented Feb 11, 2023 at 3:36
  • 1
    @Plagiatus Ok I'm adding it to the question
    – McNoob
    Commented Feb 11, 2023 at 15:23
  • wow. while trying to download the addon to have a closer look at how it works, the download page tried to download multiple viruses. You should make sure your system wasn't compromised by that.
    – Plagiatus
    Commented Feb 13, 2023 at 7:00

1 Answer 1

2

To select (and in your case subsequently kill) an item on the ground based on its name, you need to match the name string exactly.

This means you'd need to find out where the color sign is for it to be able to match. Ideally it should be after the space, but it could be before it, too, depending on how the author made it. You should be able to put it into an anvil to see the color codes position.

I recommend wrapping it in "", which is required for multiple words, and good practice otherwise.

In your case, you also misspelled the name of the item, missing the last "u".

@e[type=item,name="Katana §4Kuzanagui"]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.