QtCraft API C++ classes QML types Handbook

<server/commands/QcPermission.h>

Declarations at global scope in server/commands/QcPermission.h. More...

Header: #include <server/commands/QcPermission.h>

Types

enum class QcPermission { Player, Operator, Console }

Functions

bool qcAllows(QcPermission granted, QcPermission needed)

Detailed Description

Type Documentation

enum class QcPermission

What a command source may do (decision E-243).

Every player may use the player commands; operators (the operator list of the world, the local single player) all others except the server's own; the server console may use everything.

ConstantValueDescription
QcPermission::Player0Every player.
QcPermission::Operator1An operator.
QcPermission::Console2The server console.

Function Documentation

bool qcAllows(QcPermission granted, QcPermission needed)

Returns whether a source with the right granted may run what needs needed.