In singleplayer, there is no way to configure the function-permission-level setting. This setting is only available in server.properties, which does not exist in singleplayer environments.
As a result, datapack functions are always executed at permission level 2, making it impossible to use level 3+ commands such as /save-all, /ban, /op, and /deop from within datapack functions — even when the player has cheats enabled and holds permission level 4.
Expected Behavior:
Datapack developers should be able to configure function-permission-level in singleplayer, either via:
- A per-world config file (e.g. world/function-permission-level.txt or similar), or
- An in-game setting accessible from the world options screen.
Impact:
This affects all datapack developers who rely on level 3+ commands in their functions. Testing such datapacks currently requires setting up a dedicated server, which is fragile and impractical for development workflows.
Steps to Reproduce:
1. Create a singleplayer world with cheats enabled.
2. Create a datapack with a function that runs /save-all (or /ban, /op, /deop).
3. Run the function in-game.
4. Observe: "Unknown or incomplete command" error — command is blocked due to insufficient permission level.
Please sign in to leave a comment.
0 Comments