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

Non-ops cannot run op commands from books

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened
    • Resolution: Unresolved
    • Affects Version/s: 1.16.3
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      The bug

      As mentioned in the title, non-op players can run op commands from signs (using "run_command" "clickEvent")  but not from written books (also using the "run_command" "clickEvent" mechanic). If that's not a bug, it's definitely inconsistent. IMO players should be able to run op commands from books as well. Makes the life of map makers much easier.

      How to reproduce

      1. Create a new world with cheats disabled
      2. Open the world to LAN with cheats enabled
      3. Give yourself a written book with a "run_command" clickEvent:
        /give @s written_book{title:MC-201807,author:Author,pages:['{"text":"Test","clickEvent":{"action":"run_command","value":"/give @s stone"}}']}
      4. Close and reopen the world
      5. Open the book and click on the word "Test"
        The command fails (you are not given a block of stone)
      6. Open the world to LAN again with cheats enabled
      7. Open the book and click on the word "Test"
        The command runs successfully (you are given a block of stone)

      Note

      In the above example, if "/give @s stone" is replaced with "not a command", by clicking "Test", "not a command" will be written in the chat, as if the player wrote it, which explains the above behaviour. It doesn't really execute a command, it writes in the chat instead. Signs don't do the same, so by clicking this sign :

      /give @p minecraft:oak_sign{BlockEntityTag:{Text1:'{"text":"","clickEvent":{"action":"run_command","value":"not a command"}}',Text2:'{"text":"Test"}'}}

      , nothing will happen.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              MinePro120 MinePro120
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                CHK: