Mojira Archive
MC-151857

Wrong string displayed upon /give used for multiple players

When using the /give command and targeting multiple players, the string commands.give.success.multiple should be displayed. Instead, commands.give.success.single is displayed, with the first placeholder (playername) used by number of players who were given the item.

net.minecraft.server.commands.GiveCommand#giveItem
if (collection.size() == 1) {
    cn2.sendSuccess(new TranslatableComponent("commands.give.success.single", n2, eh2.createItemStack(n2, false).getDisplayName(), collection.iterator().next().getDisplayName()), true);
} else {
    cn2.sendSuccess(new TranslatableComponent("commands.give.success.single", n2, eh2.createItemStack(n2, false).getDisplayName(), collection.size()), true);
}

Unresolved

takatalvi

2019-05-14, 08:18 PM

2024-08-04, 09:56 PM

14

5

Confirmed

Commands

/give

Minecraft 17w45a - 1.21Minecraft 17w45a, Minecraft 1.14.1, 19w42a, 20w17a, 1.17.1, 1.19.1, 1.19.3 Release Candidate 2, 1.19.3, 1.21

-