TeamSpeak-3-Java-API
TeamSpeak-3-Java-API copied to clipboard
[Feature] : permissions type
Hi, I wanted to ask you before doing this would it be appropriate to make an Enum for each permission to simplify the addition and removal of permissions?
To have something like this :
api.addClientPermission(I_CHANNEL_JOIN_POWER, value, false)`
Hi @RMrenex! Thank you for offering to help work on this feature 😄
Adding a Permission
enum or something to that effect sounds like a great idea, and it would fit perfectly in the existing API!
You could even use the TS3Api's own getPermissions()
method to get a list of all permissions (ID, name, and description) and generate the code from there 😃
Perhaps it would also be a good idea to capture whether we're dealing with a boolean or an integer permission in the code somehow, as this would allow us to do some range checks on value
in the addXYZPermission
methods. Do you agree?
Indeed it is a good idea to check the value type for a permission. I'll do it as soon as I have some time 🙂.