Permissions
The basics
Section titled “The basics”Here you’ll find the short version of what you need to understand before you can start creating your permissions:
- Permissions are called Aces
Aces (vMenu.PlayerOptions.Menu, for example) are what you want to give to your players. With such an Ace/permission, a player will be able to access different parts of the menu and perform different actions. - Groups are called Principals
Giving permissions to every single player individually would take a lot of time. That’s where Principals (groups) come in to play. You can give permissions to a specific Principal, and add Players to a principal. You can also add principals to other principals, allowing an inheritance-like permissions system to improve your setup.
You can create as many groups/Principals as you want, and you can also name them whatever you want. - Two aces you’ll see everywhere:
.Menuand.All
Almost every menu has a.Menuace and an.Allace. The.Menuace lets a player open that submenu — without it, the submenu is completely hidden from them. The.Allace grants every option inside that submenu in one go, so you don’t have to list them one by one. One important thing to remember:.Alloverrides the individual options, so if you ever want to block just one option in a menu, you must not give out that menu’s.Allace (more on that in the “Denying certain permissions” section below).
Important info when setting up permissions
Section titled “Important info when setting up permissions”The default permissions.cfg file provided in the resource download, will have all the information you need to get started, but we’ll explain some things here as well.
- First of all, all changes you make to the
permissions.cfgfile will require a server restart. Simply restarting the resource (which is not recommended anyway) will not update the changes you’ve made to the permissions. This is because the permissions file only gets executed when the server is (re)started. - Another very common misconception is thinking that vMenu reads the permissions file. To be clear, vMenu does NOT read the permissions.cfg file. You execute the permissions.cfg file yourself by adding
exec <pathToPermissionsFile>/permissions.cfgto your server.cfg. The commands inside the permissions.cfg are then executed by the server, not by vMenu. vMenu simply ‘asks’ the server “Is this player allowed to do<insert permission name here>”, and the server then returns true or false. vMenu does not know about the permissions.cfg itself. - Finally, make sure to always edit the correct
permissions.cfg. If you have the permissions.cfg file located inside the/resources/vMenu/config/folder, and your execute command (in the server.cfg) looks like this:exec resources/vMenu/config/permissions.cfgthen always edit the permissions.cfg that’s located in the config folder. If you have the permissions.cfg in the same folder where the server.cfg is located, then edit the permissions.cfg inside that same folder where the server.cfg is. In both cases, editing the wrong file will result in no changes at all when you restart the server. - If you’re going to be changing the permissions, make sure to stop the server, especially when using zap-hosting. Then once you’re done editing the permissions.cfg, start the server back up.
- Permissions that are granted to the
builtin.everyonegroup are added to all players. There’s no way to restrict this.builtin.everyonereally means “everyone”, so admins, moderators, and everyone else are included. - Want to create a new group? It’s easy, just add players to it or assign permissions to it and you’re good to go. You can call groups whatever you like. For example:
group.superadminorgroup.ownerorgroup.snailorgroup.vip.
Setting up permissions (very basic)
Section titled “Setting up permissions (very basic)”Creating a group and adding players
Section titled “Creating a group and adding players”To create a Principal/Group and add a player to it, add this somewhere at the top of your permissions.cfg file, in this example we’ll use the steam identifier:
add_principal identifier.steam:<steam_id_here> group.<groupName>For example, if I wanted to add myself to the “admin” group, I’d do it like this:
add_principal identifier.steam:110000101234567 group.adminGiving a group some permissions
Section titled “Giving a group some permissions”Then if I wanted to give myself access to the full “Online Players” menu, I would give myself the ace for it like this:
add_ace group.admin "vMenu.OnlinePlayers.Menu" allowadd_ace group.admin "vMenu.OnlinePlayers.All" allowSummary
Section titled “Summary”Summary: My permissions.cfg file would now look like this:
add_principal identifier.steam:110000101234567 group.adminadd_ace group.admin "vMenu.OnlinePlayers.Menu" allowadd_ace group.admin "vMenu.OnlinePlayers.All" allowDenying certain permissions
Section titled “Denying certain permissions”If I wanted to allow everything in the Online Players menu except for the teleporting option, then I’d have to add all allowed permissions manually, and leave out the ones I don’t want. There’s no way to allow “everything (.All)” and then “deny” certain permissions. Example:
# Add players to groupadd_principal identifier.steam:110000101234567 group.admin
# Allow all permissions EXCEPT for the teleport to player permissionadd_ace group.admin "vMenu.OnlinePlayers.Menu" allow#add_ace group.admin "vMenu.OnlinePlayers.All" allow#add_ace group.admin "vMenu.OnlinePlayers.Teleport" allowadd_ace group.admin "vMenu.OnlinePlayers.Waypoint" allowadd_ace group.admin "vMenu.OnlinePlayers.Spectate" allowadd_ace group.admin "vMenu.OnlinePlayers.Summon" allowadd_ace group.admin "vMenu.OnlinePlayers.Kill" allowadd_ace group.admin "vMenu.OnlinePlayers.Kick" allowadd_ace group.admin "vMenu.OnlinePlayers.TempBan" allowadd_ace group.admin "vMenu.OnlinePlayers.PermBan" allowadd_ace group.admin "vMenu.OnlinePlayers.Unban" allowSee how the .Teleport line is commented out? That will deny that option in the menu. Note that you also MUST comment out the .All permission for a (sub)menu if you want to deny a permission. .All permissions will always override every other option inside the menu to allow.
A complete example
Section titled “A complete example”Let’s put everything above together. Say you want an admin group that can use the whole Online Players menu, and can also open the Player Options menu — but for Player Options you only want to hand out a couple of specific options (god mode and invisibility) instead of all of them. Your permissions.cfg would look like this:
# 1. Create the group and add yourself to it (using your steam identifier here)add_principal identifier.steam:110000101234567 group.admin
# 2. Let the group open the Online Players menu AND use every option in itadd_ace group.admin "vMenu.OnlinePlayers.Menu" allowadd_ace group.admin "vMenu.OnlinePlayers.All" allow
# 3. Let the group open the Player Options menu, but only grant god mode + invisibilityadd_ace group.admin "vMenu.PlayerOptions.Menu" allowadd_ace group.admin "vMenu.PlayerOptions.God" allowadd_ace group.admin "vMenu.PlayerOptions.Invisible" allowSee the difference between the two menus? For Online Players we granted .All, so the group gets every option in that menu. For Player Options we did not grant .All — we granted .Menu (to open it) plus only the two options we actually want, so the group gets just those two and nothing else.
Setting up group inheritance
Section titled “Setting up group inheritance”Manually adding all permissions to every single group takes a lot of time. There’s a much better and faster way to go about it, using group inheritance.
The example in the default permissions.cfg file looks like this:
############################################## SETTING UP GROUP INHERITANCE ################################################ Setup group inheritance, it's probably best you don't touch this unless you know what you're doing.add_principal group.admin group.moderatorSetting up inheritance is straightforward once you understand how it works.
#1 most common mistake when it comes to setting up inheritance
Section titled “#1 most common mistake when it comes to setting up inheritance”Many (new) users who set up vMenu ask why their inheritance isn’t working, and they send me this:
add_principal group.superadmin group.admin group.mod group.leo group.whateverThis is not correct.
It’s worth stressing again here that vMenu does not read the permissions.cfg file. Each line inside the permissions.cfg is executed by the server as a command.
The add_principal command takes exactly 2 arguments: a parent and a child. It does not take 1, 3, 4, or 5 arguments, only 2.
The syntax is like this:
add_principal parent.principal child.principalAn easy way to remember this is: I want to give <parent> access to everything <child> has, but not the other way around.
So, in our first example:
add_principal group.admin group.moderatorAnd using the ‘easy way to remember the syntax’:
I want to give
group.adminaccess to everythinggroup.moderatorhas, but not the other way around.
So, now that you know that, let’s go back to the incorrect version that people often send me. Done correctly, it should look like this:
# I want to give group.superadmin everything from group.adminadd_principal group.superadmin group.admin# I want to give group.admin everything from group.modadd_principal group.admin group.mod# I want to give group.mod everything from group.leoadd_principal group.mod group.leo# I want to give group.leo everything from group.whateveradd_principal group.leo group.whateverThat’s all there is to it. You now know everything you need to know to set up vMenu’s permissions. If you have any questions, please read the FAQ page first, then read this topic about aces & principals. If you’re still stuck, feel free to ask in my Discord server. Keep in mind that vMenu (Legacy) is no longer actively supported, so any help is community-provided and not guaranteed. See the Troubleshooting & Support page for details.
Appreciate my work?
Section titled “Appreciate my work?”Consider supporting me on Patreon!
