|
2 | 2 | A Unturned Rocket Plugin about CDKey. Support MySQL
|
3 | 3 |
|
4 | 4 | # Permssion
|
5 |
| -Command:CDK Permission CDK |
| 5 | +**Command** | **Permission** |
| 6 | +---|--- |
| 7 | +`cdk` | `cdk` |
6 | 8 |
|
7 |
| -# Database edit |
8 |
| -Give Items<br> |
9 |
| -Items id,id,id ----one by one<br> |
10 |
| -Amount number,number,number ---one by one<br> |
11 |
| -<br> |
12 |
| -Example: <br> |
13 |
| -method 1 Items:253,253,253 => item 253x3<br> |
| 9 | +# Database editing |
14 | 10 |
|
15 |
| -method 2 Items:263. Amount:3 => item 253x3 |
| 11 | +The database editing section describes the format of the data fields in the database. |
16 | 12 |
|
17 |
| -Give Permission<br> |
| 13 | +## Items and Amount fields |
18 | 14 |
|
19 |
| -GrantPermissionGroup:vip<br> |
20 |
| -ValidUntil:use Navicat to modify it.It determines the validity period of the permission group<br> |
21 |
| -Tip1: Permission Group ID,NOT DisplayName<br> |
22 |
| -Tip2: Change "UsePermissionSync" to 1<br> |
23 |
| -It can let my another plugin "PermissionSync" to manager permission to give<br> |
| 15 | +The Items and Amount fields are used to store a list of items and their corresponding quantities. |
24 | 16 |
|
25 |
| -Change EnableRenew to 1.it can Enables CDK to be redeemed to extend the validity period of the permission group<br> |
26 |
| -ValidUntil needs to be modified synchronously to decide the extension time |
| 17 | +**Items field** |
| 18 | + |
| 19 | +When the Amount field is empty, the Items field must be a comma-separated list of ushort values, where each value represents an item id. |
| 20 | + |
| 21 | +**Examples** |
| 22 | + |
| 23 | +* When the Items field is `1,2,3` and the Amount field is ``, then the database stores a list of three items, each with a quantity of 1. |
| 24 | +* When the Items field is `1,2,3` and the Amount field is `1,2,3`, then the database stores a list of three items, where the first item has a quantity of 1, the second item has a quantity of 2, and the third item has a quantity of 3. |
| 25 | + |
| 26 | +**Notes** |
| 27 | + |
| 28 | +* The Items field is required. |
| 29 | +* The Amount field is optional. |
| 30 | +* When the Amount field is empty, the quantity for each item is assumed to be 1. |
| 31 | + |
| 32 | +**Additional notes:** |
| 33 | + |
| 34 | +* It is recommended to write both the Items and Amount fields together. This will make it easier to read and understand the data. |
| 35 | + |
| 36 | + |
| 37 | +# Permission group |
| 38 | + |
| 39 | +This document describes the format of the permission group data structure. |
| 40 | + |
| 41 | + |
| 42 | +The following fields are used to represent a permission group: |
| 43 | + |
| 44 | +* **GrantPermissionGroup:** The ID of the permission group. |
| 45 | +* **ValidUntil:** The expiration date of the permission group. |
| 46 | +* **EnableRenew:** Whether the permission group can be renewed. |
| 47 | +* **UsePermissionSync:** Whether the permission group management is delegated to another plugin. |
| 48 | + |
| 49 | +## Explanation |
| 50 | + |
| 51 | +* **GrantPermissionGroup:** The permission group ID is a unique string that identifies a permission group. |
| 52 | +* **ValidUntil:** The expiration date of a permission group is the date and time after which the permission group will be automatically revoked. |
| 53 | +* **EnableRenew:** When set to `1`, the permission group can be renewed. When set to `0`, the permission group cannot be renewed. |
| 54 | +* **UsePermissionSync:** When set to `1`, the permission group management is delegated to another plugin. When set to `0`, the permission group management is handled by this plugin. |
| 55 | + |
| 56 | +## Notes |
| 57 | + |
| 58 | +* **GrantPermissionGroup:** This is the ID of the permission group, **not** the display name. |
| 59 | +* **UsePermissionSync:** When set to `1`, the permission group management is delegated to another plugin. When set to `0`, the permission group management is handled by this plugin. |
| 60 | +* When `EnableRenew` is set to `1`, the `ValidUntil` field must also be set to a valid date and time. |
| 61 | + |
| 62 | +## CDK-related fields |
| 63 | + |
| 64 | +The following fields are used to represent CDK-related information about a key: |
| 65 | + |
| 66 | +* **CDKKey:** The CDK key used to redeem the permission group. This is the primary key. |
| 67 | +* **MaxRedeem:** The maximum number of times that this key can be redeemed. |
| 68 | +* **RedeemedTimes:** The number of times that this key has been redeemed. |
| 69 | +* **Owner:** The Steam digital ID of the owner of the key, if any. |
0 commit comments