Better Permissions
Easy to use permissions plugin
Features
- Manage rocket permissios with commands
- Sync permissions across servers using MySQL
- Written with performance in mind
- Easy to use export/import feature to save copies of your permissions
- Support for adding players to permissions for a limited time (Useful for vip ranks)
Commands Information
All commands are prefixed with /bp. I do not recommend you to give normal users permission to use any command from this plugins.
Command Parameters
- <required> - Means that the parameter is required in order to execute the command
- [optional] - Means that it is an optional parameter and it is not required
General Commands
/bp
Permission: bp
Has no use. It's only purpose is to provide access to all the other commands from this plugin.
/bp reload
Permission: bp.reload
Reloads the permissions and syncs them with the database
/bp export
Permission: bp.export
Creates a copy of the permission and gives you a link so that you can access them. Warning! The permissions will be uploaded to a private paste at paste.gg
/bp import <pasteId>
Permission: bp.import
Downloads the copy created by export command and saves it to the database. Warning! Just in case of failure this command will make a backup of your permissions in paste.gg so that they can be restored later
For example. We got this url from the import command https://paste.gg/p/anonymous/85a50c49a4ed497db96a2eb65dd68605 we are going to grab the id 85a50c49a4ed497db96a2eb65dd68605 and then to restore this export we will execute
/bp import 85a50c49a4ed497db96a2eb65dd68605
/bp migrate <TableNameGroups> <TableNamePermissions> <TableNamePlayers>
Permission: bp.migrate
Migrates the permissions from advanced permissions to Better Permissions.
For example. We have the following database details in advanced permissions.
<MySqlConfiguration>
<DefaultGroup>default</DefaultGroup>
<DatabaseAddress>127.0.0.1</DatabaseAddress>
<DatabasePort>3306</DatabasePort>
<DatabaseUsername>unturned</DatabaseUsername>
<DatabasePassword>password</DatabasePassword>
<DatabaseName>unturned</DatabaseName>
<TableNameGroups>groups</TableNameGroups>
<TableNamePermissions>permissions</TableNamePermissions>
<TableNamePlayers>members</TableNamePlayers>
<UseCache>true</UseCache>
<EnableCacheRefreshMessage>false</EnableCacheRefreshMessage>
<AutoDetermineCacheRefresh>true</AutoDetermineCacheRefresh>
<CacheRefreshIntervalMilliseconds>30000</CacheRefreshIntervalMilliseconds>
</MySqlConfiguration>
We are going to make sure that Better Permissions is running in the same database as advanced permission. Then we will copy this fields: TableNameGroups, TableNamePermissions and TableNamePlayers.
/bp migrate groups permissions members
As you can see we will input the table names. The order must be the same as the one specified above
Group Commands
Command Parameters
- <id> - Is the id of the permission group you want to work with when executing the command. It is required and must be valid !!
/bp creategroup <id>
Permission: bp.creategroup
Creates a new permissions group using the id provided
/bp deletegroup <id>
Permission: bp.deletegroup
Deletes a permissions group using the id provided
/bp group <id> info
Permission: bp.group.info
Displays general information about the permissions. Id, Name, Color, Prefix, Suffix, Parent Group, Priority, etc
/bp group <id> setname <name>
Permission: bp.group.setname
Sets the display name of the permissions group
/bp group <id> setcolor <color>
Permission: bp.group.setcolor
Sets the color of the ermissions group. Color can be a hex color or name.
/bp group <id> setprefix <prefix|remove>
Permission: bp.group.setprefix
Sets the prefix of the permissions group. If the prefix is remove it will remove the prefix from the permissions group (leaves it empty)
Example
/bp group default setprefix "[Member] "
Make sure you use the " " and leave a space at the end.
/bp group <id> setsuffix <suffix|remove>
Permission: bp.group.suffix
Sets the suffix of the permissions group. If the suffix is remove it will remove the suffix from the permissions group (leaves it empty)
Example
/bp group default setsuffix " [Suffix Member]"
Make sure you use the " " and leave a space at the start.
/bp group <id> setparent <parentId|remove>
Permission: bp.group.setparent
Sets the parent of the permissions group. If the parentId is remove it will remove the parent from the permissions group
Example
/bp group vip+ setparent vip
This examples makes the vip+ permission group to include the vip group permissions. Recommended to avoid duplication.
Group Permissions Commands
Command Parameters
- <id> - Is the id of the permission group you want to work with when executing the command. It is required and must be valid !!
Permission: bp.group.permissions
/bp group <id> permissions add <permission> [cooldown]
Permission: bp.group.permissions.add
Adds a permission with an optional cooldown to the group
/bp group <id> permissions remove <permission>
Permission: bp.group.permissions.remove
Removes a permission from the group
/bp group <id> permissions check <permission>
Permission: bp.group.permissions.check
Check if a permission was given to the group. This command tells us if that group has the specified permission
/bp group <id> permissions list [page]
Permission: bp.group.permissions.list
Returns a paginated list of the permissions that the group has.
Examples:
This will list the first 10 permissions from the default group (from the first to the 10)
/bp group default permissions list
This will list the permissions the next 10 permissions (from the 11 to the 21)
/bp group default permissions list 2
Group Members Commands
Command Parameters
- <id> - Is the id of the permission group you want to work with when executing the command. It is required and must be valid !!
Permission: bp.group.members
/bp group <id> members add <player> [duration]
Permission: bp.group.members.add
Adds a player to the permission group (/p add rocket equivalent command). Specify the player id for offline/online player or the name for online players
Examples:
This will add a player to the vip group
/bp group vip members add 76561198829616065
This will add a player to the vip group for 5 days and 30 minutes
/bp group vip members add 76561198829616065 5d 30m
/bp group <id> members remove <player>
Permission: bp.group.members.remove
Removes a player from the permission group (/p remove rocket equivalent command). Specify the player id for offline/online player or the name for online players
/bp group <id> members check <player>
Permission: bp.group.members.check
Check if a member is part of the specified group. This command tells us if that group has the specified player in the members
/bp group <id> members list [page]
Permission: bp.group.members.list
Returns a paginated list of the members that the group has.
Examples:
This will list the first 10 members from the default group (from the first to the 10)
/bp group default members list
This will list the members the next 10 members (from the 11 to the 21)
/bp group default members list 2
Configuration
<?xml version="1.0" encoding="utf-8"?>
<BetterPermissionsPluginConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DefaultGroupId>default</DefaultGroupId>
<MySqlConfiguration>
<ServerAddress>127.0.0.1</ServerAddress>
<ServerPort>3306</ServerPort>
<Username>root</Username>
<Password>password</Password>
<DatabaseName>unturned</DatabaseName>
<ConnectionString />
</MySqlConfiguration>
<CacheConfiguration>
<CacheExirationMinutes>5</CacheExirationMinutes>
</CacheConfiguration>
<PermissionCheckerConfiguration>
<AdminHaveAllPerms>false</AdminHaveAllPerms>
<AdminHaveAllGroups>false</AdminHaveAllGroups>
</PermissionCheckerConfiguration>
<TemporalMembersConfiguration>
<CheckIntervalMinutes>1</CheckIntervalMinutes>
</TemporalMembersConfiguration>
</BetterPermissionsPluginConfiguration>
Translations
<?xml version="1.0" encoding="utf-8"?>
<Translations xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Translation Id="Success" Value="Permissions reloaded" />
<Translation Id="NoPermission" Value="You are not allowed to execute this command" />
<Translation Id="BpUsage" Value="Usage: /bp <group|export|import|reload|migrate>" />
<Translation Id="GroupUsage" Value="Usage: /bp group <id> <info|setname|setcolor|setprefix|setsuffix|setparent|permissions|members>" />
<Translation Id="GroupPermisionsUsage" Value="Usage: /bp group <id> permissions <add|remove|list|check>" />
<Translation Id="GroupMembersUsage" Value="Usage: /bp group <id> members <add|remove|list|check>" />
<Translation Id="CreateGroupUsage" Value="Usage: /bp creategroup <id>" />
<Translation Id="GroupAlreadyExists" Value="Group with id {Id} already exists" />
<Translation Id="FailedToCreateGroup" Value="Failed to create group {Id}" />
<Translation Id="CreateGroupSuccess" Value="Successfully created group {Id}" />
<Translation Id="DeleteGroupUsage" Value="Usage: /bp deletegroup <id>" />
<Translation Id="GroupNotFound" Value="Group with id {Id} was not found" />
<Translation Id="FailedToDeleteGroup" Value="Failed to delete group {Id}" />
<Translation Id="DeleteGroupSuccess" Value="Successfully deleted group {Id}" />
<Translation Id="SetGroupNameUsage" Value="Usage: /bp group <id> setname <name>" />
<Translation Id="SetGroupNameSuccess" Value="Successfully set group name" />
<Translation Id="SetGroupColorUsage" Value="Usage: /bp group <id> setcolor <color>" />
<Translation Id="ColorNotFound" Value="Color {Color} is not valid" />
<Translation Id="SetGroupColorSuccess" Value="Successfully set group color" />
<Translation Id="SetGroupPrefixUsage" Value="Usage: /bp group <id> setprefix <prefix|remove>" />
<Translation Id="SetGroupPrefixSuccess" Value="Successfully set group prefix" />
<Translation Id="SetGroupSuffixUsage" Value="Usage: /bp group <id> setsuffi <suffix|remove>" />
<Translation Id="SetGroupSuffixSuccess" Value="Successfully set group suffix" />
<Translation Id="SetGroupParentUsage" Value="Usage: /bp group <id> setparent <parentId|remove>" />
<Translation Id="SetGroupParentSuccess" Value="Successfully set group parent" />
<Translation Id="AddPermissionToGroupUsage" Value="Usage: /bp group <id> permissions add <permission> [cooldown]" />
<Translation Id="InvalidCooldownProvided" Value="Cooldown is not a valid integer" />
<Translation Id="AddPermissionToGroupSuccess" Value="Successfully added permission to group" />
<Translation Id="RemovePermissionFromGroupUsage" Value="Usage: /bp group <id> permissions remove <pemission>" />
<Translation Id="RemovePermissionFromGroupSuccess" Value="Successfully removed permission from group" />
<Translation Id="ListPermissionsFromGroupCommand" Value="[{Page}/{PageCount}] {GroupName} group permissions" />
<Translation Id="CheckGroupPermissionsCommandUsage" Value="Usage: /bp group <id> permissions check <permission>" />
<Translation Id="PermissionNotInGroup" Value="Permission {Permission} is not a permission from this group" />
<Translation Id="PermissionInGroup" Value="ermission {Permission} is a permission from this group" />
<Translation Id="AddMemberToGroupCommandUsage" Value="Usage: /bp group <id> members add <player>" />
<Translation Id="AddMemberToGroupCommandSuccess" Value="Successfully added player to group" />
<Translation Id="RemoveMemberFromGroupCommandUsage" Value="Usage: /bp group <id> members remove <player>" />
<Translation Id="RemoveMemberFromGroupCommandSuccess" Value="Successfully removed player from group" />
<Translation Id="ListMembersFromGroupCommand" Value="[{Page}/{PageCount}] {GroupName} group members" />
<Translation Id="CheckGroupMemberCommandUsage" Value="Usage: /bp group <id> members check <player>" />
<Translation Id="PlayerNotInGroup" Value="Player {Search} is not a member of the group" />
<Translation Id="PlayerInGroup" Value="Player {Search is a member of the group" />
<Translation Id="GroupInfo" Value="Id: {Id}
Name: {DisplayName}
Prefix: {Prefix}
Suffix: {Suffix}
Chat color: {Color}
Parent Group: {ParentGroup}
Members Count: {Members.Count}
Permissions Count: {Permissions.Count}" />
<Translation Id="PlayerNotFound" Value="Player {Search} was not found" />
</Translations>