mojira.dev
MCPE-236151

/enchant produces multiple lines of command output in one case

The bug

Most commands are supposed to produce exactly one success message or one failure message upon completion. However, the /enchant command can produce multiple messages when selecting multiple entities, and some were affected but others weren’t.

Result

Expected output

Actual output

No targets enchanted an item

One error message

✅ One error message

Some targets enchanted an item, some didn’t

One success message

❌ One success and one error message

All targets enchanted an item

One success message

✅ One success message

How to reproduce

  1. Spawn a few armor stands

  2. Run /enchant @e[type=armor_stand] sharpness
    ✅ One error message is produced

  3. Give one of the armor stands a diamond sword

  4. Run /enchant @e[type=armor_stand] sharpness
    ❌ Multiple messages are produced

  5. Give all of the armor stands a diamond sword

  6. Run /enchant @e[type=armor_stand] looting
    ✅ One success message is produced

Expected behavior

In all cases, one feedback message should appear for one command

Observed behavior

In some cases, multiple feedback messages appear

Notes

When the command fails for different reasons (not holding an item vs. incompatible enchantments), the error messages show up separately. This can also cause case 1 to improperly produce multiple messages.

Comments 0

No comments.

tryashtar

(Unassigned)

1563007

Confirmed

Windows

26.0, 26.10.23 Preview

Retrieved