a guest Oct 23rd, 2019 25 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- There is a very good wrapper called Pustalorc.ImperialPlugins.Permissions.API.Statics.Utilities that includes most of the ways to interact with the plugin and the provider, however for manual interaction, all you will have to do is cast Rocket.Core.R.Permissions to the type IPermissionsProvider, which includes all the extras on interacting with the permissions provider.
- For example, to get all groups:
- allGroups = ((IPermissionsProvider) R.Permissions).GetGroups().ToList();
- Make sure to check the Interface to see all the possible interactions.
- If you want to interact with a temporary membership whilst the player is online, the best practice, is to use the membership component located in Pustalorc.ImperialPlugins.Permissions.TemporaryMemberships.TemporaryMembershipComponent
- Example usage:
- var timeSinceJoin = DateTime.Now.Subtract(UnturnedPlayer.GetComponent<TemporaryMembershipComponent>().Join);
- That will then allow you to update the database with new time, or display to the user in a UI how much time they have left.
RAW Paste Data