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

Non-ops cannot run op commands from books

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.16.3, 1.17.1, 1.20.6, 1.21
    • None
    • Confirmed
    • Commands

      The bug

      As mentioned in the title, non-op players can run op commands from signs (using "run_command" "clickEvent", MC-59653), but not from written books (also using the "run_command" "clickEvent" mechanic). If that's not a bug, it's definitely inconsistent.

      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[written_book_content={title:"MC-201807",author:"Author",pages:['{"text":"Test","clickEvent":{"action":"run_command","value":"/give @s stone"}}']}] 1
      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)

            Unassigned Unassigned
            zTxrbq [Mod] turbo
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              CHK: