Fabric

On Fabric, the only system provided is Minecraft's op permissions system. Because of that, PermissionsEx provides all of its own integrations with Minecraft itself, and some other mods. We are happy to work with other mods to implement permissions checks as well -- feel free to pop into our Discord.

Minecraft permissions

We aim to replace every op check in vanilla (i.e. unmodded) Minecraft with a permissions check. To that end, we provide the following permissions:

Subjects for Minecraft entities

  • Players are represented as users

  • The server console is represented as the subject system:Console

  • Command blocks are represented as commandblock:<name>, where the default command block name is @

  • Sign representation has not been decided yet

  • RCON connections are represented as system:Recon (Yes, that is Recon -- that's what the Rcon command source is named internally.)

  • Functions executed through tags #minecraft:tick and #minecraft:load tags are represented as function:minecraft:tick and function:minecraft:load respectively

NOTE: functions currently only perform permissions checks when they're loaded, not on individual executions. This needs to be resolved for function permissions to actually be useful.

Contexts

Other mods

  • We provide a permission resolver for WorldEdit so its commands check PermissionsEx for permissions

Developer information

PEX provides a significant level of integration into Fabric. This provides some details on what we look for when trying to provide permissions checks

Permission check methods

  • ServerCommandSource.hasPermissionLevel

  • Entity.allowsPermissionLevel

  • Entity.getPermissionLevel

  • PlayerEntity.isCreativeLevelTwoOp

  • ServerPlayNetworkHandler.isServerOwner

  • MinecraftServer.isOwner

  • MinecraftServer.getPermissionLevel

  • PlayerManager.isOperator

  • PlayerManager.areCheatsAllowed

  • PlayerManager.getOpList

  • PlayerManager.getOpNames

  • OperatorList.get

Known outstanding issues

  • Broadcast to ops should have the subject type of the source in the permission somehow

  • Check whether we enforce creative mode for certain items (debug stick, etc)

  • Changing permissions is very slow -- investigate this

Client checks op for

  • F3 Debug toggle creative/spectator

  • Debug stick and other technical blocks

Last updated