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
Spawn a few armor stands
Run
/enchant @e[type=armor_stand] sharpness
✅ One error message is producedGive one of the armor stands a diamond sword
Run
/enchant @e[type=armor_stand] sharpness
❌ Multiple messages are producedGive all of the armor stands a diamond sword
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.