Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Commit

Permalink
[+] README添加调用文档
Browse files Browse the repository at this point in the history
  • Loading branch information
hykilpikonna authored Jul 27, 2018
1 parent 8790254 commit 45150f8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,17 @@
!usp add [qq|@] [name] 把用户加入权限组
!usp remove [qq|@] [name] 把用户从权限组移除
```

#### 调用:

执行指令的时候判断发送指令的用户有没有权限, 如果没有权限就发送缺少权限的消息:

```java
if (!Permissions.verifyAndSendText(事件, QQ号, "权限节点")) return null;
```

例子:

```java
if (!Permissions.verifyAndSendText(event, user.getId(), "permissionmanager.usp")) return null;
```

0 comments on commit 45150f8

Please sign in to comment.