Video
Readme

MySQL Permissions

Store permissions and groups in a MySQL to share across multiple servers.

Features

  • Store permissions and groups in a MySQL database.
  • Automatically reload permissions every X seconds.
  • Add and remove players from groups using commands.
  • Migrate from Advanced Permissions to MySQL Permissions.
  • Add members to groups with a duration.

It is used by some popular servers like Unbeaten, Zombie Zone, Unturned America and more.

Commands

  • /padd <group> <steamid> [duration] - Add a player to a group. Duration can be specified as 30d, 12h 30m, 5m, etc.
  • /premove <group> <steamid> - Remove a player from a group.
  • /migrateadvancedpermissions <groupsTable> <permissionsTable> <membersTable> [serverGroup] - Migrate from Advanced Permissions to MySQL Permissions. Server group is optional and this command can only be executed by the console.
  • /migratepermissions [serverGroup] - Migrate permissions from Permissions.config.xml to MySQL Permissions tables.
  • /mysqlpermissions-dropforeignkeys - Drop foreign keys from MySQL Permissions tables.
  • /mysqlpermissions-addforeignkeys - Add foreign keys to MySQL Permissions tables.

Configuration

<?xml version="1.0" encoding="utf-8"?>
<MySQLPermissionsConfiguration xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <MessageColor>yellow</MessageColor>
  <ConnectionString>Server=127.0.0.1;Database=Zombiesia;User Id=root;Password=password;</ConnectionString>
  <PermissionGroupsTableName>PermissionGroups</PermissionGroupsTableName>
  <PermissionsTableName>Permissions</PermissionsTableName>
  <PermissionGroupMembersTableName>PermissionGroupMembers</PermissionGroupMembersTableName>
  <DefaultGroupIds>
    <GroupId>default</GroupId>
  </DefaultGroupIds>
  <ShouldAutoReloadPermissions>true</ShouldAutoReloadPermissions>
  <ReloadPermissionsSeconds>30</ReloadPermissionsSeconds>
  <ServerGroup>PVP</ServerGroup>
  <AddMembersWithServerGroup>true</AddMembersWithServerGroup>
</MySQLPermissionsConfiguration>

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="RemoveMemberInvalid" Value="Invalid format. Use /premove &lt;groupId&gt; &lt;playerId&gt;" />
  <Translation Id="RemoveMemberInvalidSteamId" Value="{0} is not a valid SteamId" />
  <Translation Id="RemoveMemberGroupNotFound" Value="Group {0} does not exist" />
  <Translation Id="RemoveMemberPlayerNotInGroup" Value="{0} is not a member of {1} group" />
  <Translation Id="RemoveMemberSuccess" Value="Successfully removed {0} from {1} group!" />
  <Translation Id="AddMemberInvalid" Value="Invalid format. Use /padd &lt;groupId&gt; &lt;playerId&gt; [duration]" />
  <Translation Id="AddMemberInvalidSteamId" Value="{0} is not a valid SteamId" />
  <Translation Id="AddMemberGroupNotFound" Value="Group {0} does not exist" />
  <Translation Id="AddMemberSucccess" Value="Successfully added {0} to {1} group!" />
  <Translation Id="AddMemberSucccessDuration" Value="Successfully added {0} to {1} group for {2}!" />
  <Translation Id="AddMemberSuccessWithDuration" Value="Successfully added {0} to {1} group for {2}!" />
</Translations>