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

"selector" Tag Not Usable in "translate" Arguments for /tellraw and /title

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 14w20b
    • Fix Version/s: Minecraft 14w21b
    • Labels:
      None
    • Confirmation Status:
      Unconfirmed

      Description

      The following translatable text will be used:

      achievement.openInventory.desc = Press '%1$s' to open your inventory.

      To insert text in place of the argument (%1$s), the "with" list-tag must be used. For example, a working command:

      /tellraw @a {
      	translate:"achievement.openInventory.desc",
      	with:[
      		{
      			text:"TEST",
      			color:gold
      		}
      	]
      }
      

      Result: "Press 'TEST' to open your inventory."

      However, using the new "selector" tag will not provide the player's name, and instead displays the selector itself:

      /tellraw @a {
      	translate:"achievement.openInventory.desc",
      	with:[
      		{
      			selector:"@p",
      			color:gold
      		}
      	]
      }
      

      Result: "Press '@p' to open your inventory."

      Changing the "with" to "extra" will properly display the player's name at the end of the text, showing that the selector works correctly elsewhere:

      /tellraw @a {
      	translate:"achievement.openInventory.desc",
      	extra:[
      		{
      			selector:"@p",
      			color:gold
      		}
      	]
      }
      

      Result: "Press '' to open your inventory.Skylinerw"

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                skylinerw [Mod] Skylinerw
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: