#Commands for op doesnt work?

1 messages · Page 1 of 1 (latest)

gritty night
#

Hello, im trying to make a command but i cant seem to give it an op requirement because "hasPermissionLevel" doesnt seem to exist
that the wiki says it has

im using 1.21.11 with yarn mappings

manic herald
#

command permission levels got refactored recently, and the fabric wiki is outdated

#

i would recommend migrating to mojang mappings tho, as yarn wont exist starting from 26.1

gritty night
stone spear
#

they recently redid the articles on the documentation to be in mojmaps, so thats always a good idea to keep in mind, and a new reason to switch soon

feral sun
#

.requires(source -> source.permissions().hasPermission(Permissions.COMMANDS_ADMIN))

#

replace Permission with your preferred permission

#

its annoying but its honestly better than arbitrary 1-4 🤷