Git Product home page Git Product logo

picqpermissionmanager's Introduction

PicqBotX 插件管理器 > 插件列表 > PicqPermissionManager权限管理插件

安装插件:

  1. 下载预构建JAR
  2. 放到运行目录/plugins/目录下.
  3. 重启Picq插件管理服务器.
  4. 完成!

Maven导入:

没有添加JitPack的Repo的话首先添加Repo, 在pom里面把这些粘贴进去:

<repositories>
    <repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
    </repository>
</repositories>

然后添加这个库:

<dependency>
    <groupId>com.github.HyDEV-Plugins</groupId>
	  <artifactId>PicqPermissionManager</artifactId>
    <version>1.0.0</version>
</dependency>

然后ReImport之后就导入好了!


指令:

!op set [qq|@]            将一个QQ号设为管理员
!op remove [qq|@]         将一个QQ号移除管理员

!grp list                 列出现有权限组
!grp info [name]          查询权限组信息
!grp create [name]        创建权限组
!grp remove [name]        移除权限组
!grp perm add [name] [perm]     给一个组添加权限
!grp perm remove [name] [perm]  从一个组移除权限
!grp group add [name] [name]    给一个组添加子权限组
!grp group remove [name] [name] 从一个组移除子权限组

!usp info [qq|@]          查询用户权限信息
!usp add [qq|@] [name]    把用户加入权限组
!usp remove [qq|@] [name] 把用户从权限组移除

调用:

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

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

例子:

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

picqpermissionmanager's People

Contributors

hykilpikonna avatar

Watchers

James Cloos avatar

Forkers

zuaa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.