Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-151857

Wrong string displayed upon /give used for multiple players

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Minecraft 1.14.1, 19w42a, 20w17a, 1.17.1
    • Fix Version/s: None
    • Labels:
    • Confirmation Status:
      Confirmed
    • Category:
      Commands

      Description

      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);
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              takatalvi Taka Talvi
              Votes:
              8 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                CHK: