v0.4.31: skip permission-level check for non-player sources
Some checks failed
build / build (push) Has been cancelled

The previous .requires gate used Permissions.COMMANDS_GAMEMASTER (level 2),
which is the right check for player sources but ties datapack /function
calls to the functionPermissionLevel gamerule. If admins kept that gamerule
below 2, datapack-driven /videoPlace etc. silently failed and required a
gamerule bump.

Extract a CommandPermissions.opOrServer helper used by all 5 /video*
commands. Players still need OP (level 2+); console, command block, and
datapack function sources bypass the level check entirely.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
tkrmagid
2026-05-20 10:31:45 +09:00
parent c55a9e4e05
commit 3f2d37587d
7 changed files with 56 additions and 15 deletions

View File

@@ -5,7 +5,7 @@ org.gradle.configuration-cache=false
# Mod
mod_id=video_player
mod_version=0.4.30
mod_version=0.4.31
maven_group=com.ejclaw.videoplayer
archives_base_name=video_player