-
Notifications
You must be signed in to change notification settings - Fork 0
Permissions
Äkwav edited this page Aug 5, 2019
·
3 revisions
Permissions are the gatekeeper to commands.
You can set as many Permissions in front of a Command as you want.
They all have to be met bevore the Command will be executed.
It consists of two parts:
- An unique name (most of the time the class name)
- The Check if the Permission is met:
bool CheckPermission(MessageData data, Referenceable target)
It gets the data of the command trying to be executed and the Referenceable that it will be executed on. It has to return true to continue or false to stop executing.
Permissions should work for any type of object given to them and may not fail ever.
Also they should not use any other, external, objects other than given its parameters.