9 Star 39 Fork 57

Soldier__ / VipSystemRecode

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
LGPL-3.0

VipSystem

简介

VipSystemEx可以帮你自主管理服务器的vip,支持限时,永久,可切换的vip。本插件使用带索引的SQLite或MySQL进行数据存储,支持自定义开启/关闭连接池,保证了兼容性和高效性。

命令

命令 用途 权限
/vipsys me 查看你的vip情况
/vipsys changevip 切换已开通的Vip vipsys.changevip
/vipsys give [玩家名] [Vip组名] [时间] 给予玩家Vip(时间格式为xdxhxmxs,x天 x小时 x分 x秒) vipsys.give
/vipsys remove [玩家名] 移除玩家的Vip vipsys.remove
/vipsys list 查看Vip列表 vipsys.list
/vipsys look [玩家名] 查看玩家Vip情况 vipsys.look
/vipsys reload 重载插件 vipsys.reload
/vipsys customs 查看自定义函数 vipsys.customs

用法介绍

基础用法

准备工作

将插件安装至服务器,重启
如果你需要使用中文版的插件,请找到/plugins/VipSystem/config.yml
将文件中的lang: en改为lang: zh_CN
并在服务器输入命令/vipsys reload以重载
你不需要额外配置默认组,插件会自动根据权限组插件返回默认组
创建好对应的vip组待命,例如创建一个组名为vip的组
如果你之前使用了旧版本的VipSystem 你可以直接将新版本安装进服务器并删除旧版本 插件会自动进行版本间的配置文件更新和数据结构更新

发放Vip

设玩家名为 Test 需要发放给Test 30天的vip权限组
则输入命令/vipsys give Test vip 30d
玩家可以使用/vipsys me来查看自己的vip情况
若需要移除vip,只需管理员输入/vipsys remove Test即可移除

使用占位符

如果你需要使用VipSystem提供的占位符,你需要安装PlaceholderAPI插件
占位符映射如下

占位符 用途
%vipsystem_vip% vip组名
%vipsystem_expire% 到期时间
%vipsystem_previous% 开通之前的组名
%vipsystem_left% 剩余天数

进阶用法

语言设置

插件内置了英语和中文,你可以将配置文件中的lang项目的值改为zh_CNen来使用插件内置的两种语言
你也可以自定义语言,将lang的值改为语言名之后,重载插件,插件会在messages目录下多生成一个以英文为模板的语言文件,你可以自主修改并重载生效语言文件

UUID模式

如果你的服务器是正版服务器
建议你在配置文件中启用UUID模式uuid: true

默认组设置

插件会根据权限组插件来决定vip到期后返回的权限组
如果你需要修改默认组,请在配置文件中设置 defaultGroup: builder
将返回的默认组改为builder或其他

返回开通前的上一个组

如果你想在玩家Vip到期时返回玩家开通Vip前的权限组
你可以设置previousGroup: true来实现这个功能
注意: 本功能和默认组设置不能同时使用

数据库

插件默认使用HikariCP连接池连接SQLite数据库,如果没有特殊需要,你无需改动该部分配置文件
如果你的服务端无法使用默认配置文件启动,并且报错中有hikarcp字样,请修改usePool的值为false
如果你需要使用MySQL,你可以设置useMySQL的值为true并在下方配置数据库地址等信息

全局Vip

如果你使用GroupManager作为权限组插件,无特殊需要,不需要更改此部分配置
如果你使用PermissionsEx作为权限组插件,并且默认配置下vip无法生效到全部世界,请将isGlobal的值设置为false,如果仍无法生效到全部世界,请在worlds下手动添加你所有的世界名,例如

worlds:
  - world
  - world_nether
  - world_the_end

自定义到期时间格式

如果需要更改日期格式,可以参考https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html的占位符进行修改

自定义命令

你可以自定义vip开通/到期时的命令,下面是默认的配置文件

customCommands:
  vip:
    activate:
      - 'say {0} has activated vip!'
      - 'give {0} minecraft:diamond'
    expire:
      - 'say {0} is no longer a vip'
  svip:
    activate:
      - 'say {0} has activated svip!'
      - 'give {0} minecraft:diamond'
    expire:
      - 'say {0} is no longer a svip'

意思是,在vip开通时,执行下方命令,发送消息并给玩家一个钻石

say {0} has activated vip!
give {0} minecraft:diamond

在vip到期时,执行下方命令,发送消息

say {0} is no longer a vip

svip组同理,如果你有更多的vip种类,可以按照上方格式自行添加
如果不需要使用该功能,可以直接整项删除

自定义函数

插件支持你自己编辑自定义函数,来完成一些自动的定时操作
比如你可以通过插件实现临时权限的功能
https://www.zhanshi123.me/wp-content/uploads/2020/02/1.png
具体编辑的方法可以查看 https://www.zhanshi123.me/?p=320
上图的功能你可以直接前往https://www.mcbbs.net/thread-959456-1-1.html进行下载

插件下载

该插件为免费插件,但是不提供jar的直接下载地址
你可以clone/fork该项目并自行构建,只需安装maven后进入项目目录,输入mvn install即可自动完成构建。目标文件会生成在/target目录下
如果你没有自行构建的能力,你可以联系作者支付¥20作为赞助,并由作者提供构建后的文件 所有支付的款项都是对作者开发极大的支持!

API

使用本插件作为前置(以Maven为例)

<repository>
  <id>soldier-repo</id>
  <url>https://repo.zhanshi123.me/repository/maven-public/</url>
</repository>
<dependency>
  <groupId>me.zhanshi123</groupId>
  <artifactId>VipSystem</artifactId>
  <version>4.13</version>
  <scope>provided</scope>
</dependency>

你可以通过VipSystemAPI.getInstance()来获取VipSystemAPI的实例
更多内容待补充

鸣谢

感谢下列用户对插件做出的赞助
(按时间排序)

用户 金额
yuguo99610 50元
匿名 50元

联系作者

如果你想提交bug,你可以发送issue或加群563012939联系群主获取帮助
你同样也可以通过email联系 Email: i@zhanshi123.me

GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.

简介

A Minecraft vip plugin 展开 收起
Java 等 2 种语言
LGPL-3.0
取消

发行版 (16)

全部

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/Soldier233/VipSystemRecode.git
git@gitee.com:Soldier233/VipSystemRecode.git
Soldier233
VipSystemRecode
VipSystemRecode
master

搜索帮助