ByteLib Documentation 1.1 Help

Permission Checks

The Commands API's requires() method uses Predicates, just like Brigadier. However, unlike Brigadier, it also provides a set of prebuilt Predicates for Permission checks specifically. These Predicates allow for much more powerful permission checks without complicated && and || chains.

The following Predicates are included for you under the PermissionChecks class:

  • permission("node")

  • playerOnly()

  • consoleOnly()

  • isOp()

  • senderType(...)

  • allOf(...)

  • anyOf(...)

  • not(...)

Example:

.requires(PermissionChecks.allOf( PermissionChecks.playerOnly(), PermissionChecks.permission("bytelib.guild.admin") ))
10 March 2026