Mojira Archive
MC-197607

Fix for MC-124024 does not cover certain cases

The bug

To fix MC-124024 the method net.minecraft.world.entity.Entity.removeAction(Component) is supposed to remove clickEvents from the text and its siblings. However, it does not cover the following cases (there might be more):

  • with arguments of translate component
  • NBT interpret (though this is apparently not exploitable due to MC-124008)

Reproduction steps

  1. Use the following command in a command block
    /summon armor_stand ~ ~1 ~ {CustomName:"{\"translate\":\"Armor Stand\\n%s\",\"with\":[{\"text\":\"<RandomGuy> Please click my name to write a message directly to me\",\"hoverEvent\":{\"action\":\"show_text\",\"contents\":\"\"},\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/say This could have been /op RandomGuy!\"}}]}"}
    
  2. Use the following command to have the name of the armor stand appear in chat
    /say @e[type=armor_stand,limit=1]
    

    → It looks like "RandomGuy" wrote something in chat

  3. Click on "RandomGuy" to reply to them
    You just executed an arbitrary command

Unresolved

Marcono1234

2020-08-10, 02:49 PM

2023-08-22, 02:26 PM

1

3

Confirmed

Normal

Platform

UI

1.16.2 Release Candidate 1, 1.16.2

-