Raft Dedicated Server
  • Introducing Raft Dedicated Servers
    • Introducing RTCP (Our custom networking layer)
  • Tutorials
    • Windows: Installing your server
    • Linux: Installing your server
      • GUI based distro: Installing your server
      • CLI based Distro: Installing your server
    • Pterodactyl: Installing your Server
    • Docker: Installing your Server
    • Configuring your server
    • Managing Player Permissions
    • How to create a plugin project
      • How to load my plugin
  • Programming
    • Creating chat commands
    • Creating console commands
    • Player Permissions
Powered by GitBook
On this page
  1. Programming

Player Permissions

This page will help you with checking if a player has a said permission or a group of permissions with wildcards.

RDS have class extensions to Network_Player and CSteamID. This means you can just call for example class.HasPermission() on them. Examples :

Network_Player player;
if(player.HasPermission("worldprotection.breakblocks")){
    // The player have the permission.
}else{
    // The player does not have the permission.
    // Here you might want to send them a chat message saying they don't have access.
}

Permissions also supports wildcards, which means if a plugin have all its permissions starting with worldprotection for example, you can just give all permissions with worldprotection.*. Example :

Network_Player player;
if(player.HasPermission("worldprotection.test")){
    // This will be true in any of the following cases :
    // The user have worldprotection.* permission.
    // The user have *.* permission.
    // Or the user just have worldprotection.test permission.
}
PreviousCreating console commands

Last updated 2 years ago