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

Writtenbook "score" JSON not formatting for non-opped players

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.15.2
    • None
    • (Doesn't matter when trying to recreate the issue.)

      OS;
      Windows 10 Pro 1909
      16.0 GB Ram
      64-bit System

      Java;
      Version 8 Update 151
    • Unconfirmed
    • (Unassigned)

      On servers, if a non-opped player is given a written book that uses the "score" JSON formatting, the written book will fail to format the page where the "score" JSON is used on.

      How to recreated;

      Step 1
      Have two players join a Minecraft server in 1.15.2, one player having OP (Admin) permissions and the other player having no OP (Admin) permissions.

      Step 2
      Create a scoreboard objective of any kind. (Any objective name or type works, but I'll be demonstrating with a "dummy" scoreboard named "Test".)

      /scoreboard objectives add Test dummy
      

      Step 3
      Set both player's "Test" scoreboard objective to 1. (Any value works, but I'll be demonstrating with the value of 1.)

      /scoreboard players set @a Test 1
      

      Step 4
      Use the following command inside of a command block on the server once. (You can also send through chat, a function file, or the server console.)

      /give @a written_book{title:"Test",author:"Test",pages:["[\"\",{\"text\":\"Hello\",\"color\":\"gold\"},{\"score\":{\"objective\":\"Test\",\"name\":\"@s\"}}]"]} 1
      

      Step 5
      Compare the newly given books between each other.

      The intended result is that both players should receive a written book titled "Test", with the expected text inside to be the word "Hello" colored gold followed by the integer 1.

      While the player with Admin permissions (OP) can see what is described above, the non-opped player see's failed JSON formatting code.

      Step 6
      Clear or store the given books in a chest and give both players OP (Admin) permissions.

      Step 7
      Run the exact same command as in Step 4.

      Step 8
      Compare the newly given books between each other.

      As you can see; both players are now able to see the proper formatting inside the written book; the word "Hello" in gold followed by a 1.

      Step 9
      Clear or store the given books in a chest and revoke both players OP (Admin) permissions.

      Step 10
      Run the exact same command as in Step 4.

      Step 11
      Compare the newly given books between each other.

      Both players should of received a written book named "Title" that has a page of failed JSON formatting code.

      Conclusion
      When using the "score" JSON formatting inside of a written book, players that are not OPed (Non Admins) have invalid permissions to use the "score" JSON formatting function, causing the JSON formatting inside the written books page to fail.

        1. successful.png
          319 kB
          Donisi
        2. failed.png
          350 kB
          Donisi

            Unassigned Unassigned
            Donisi Donisi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: