mojira.dev
MC-308014

The success message of `/clear` reports that it affected more players than it did

The bug

When a /clear command targets multiple players, it can succeed for some but fail for others. In this case, the feedback message incorrectly shows the number of players that were targeted, rather than the number that had matching items.

How to reproduce

  1. Have two players in the world

  2. /give @p tnt

  3. /clear @a tnt

Expected result

Should say “Removed 1 item(s) from player (your name)”

Observed result

Says “Removed 1 item(s) from 2 players”

Notes

The result of the command is the total number of items that were cleared. It appears in the feedback message correctly.

This issue was split from MC-122717

Linked issues

Comments 1

This was also fixed in 26.3-snapshot-1

tryashtar

(Unassigned)

Confirmed

Platform

Low

Commands

26.1.2, 26.2 Snapshot 6

26.3 Snapshot 1

Retrieved