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

Commit

Permalink
Merge pull request #71 from XiaMoHuaHuo-CN/dev
Browse files Browse the repository at this point in the history
Push to main
  • Loading branch information
Muska-Ami authored Jan 12, 2023
2 parents 262882d + 863c448 commit 4bed20f
Show file tree
Hide file tree
Showing 23 changed files with 420 additions and 129 deletions.
Binary file modified .gradle/7.4/checksums/checksums.lock
Binary file not shown.
Binary file modified .gradle/7.4/checksums/md5-checksums.bin
Binary file not shown.
Binary file modified .gradle/7.4/checksums/sha1-checksums.bin
Binary file not shown.
Binary file modified .gradle/7.4/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified .gradle/7.4/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified .gradle/7.4/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/7.4/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified .gradle/7.4/fileHashes/resourceHashesCache.bin
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Binary file modified .gradle/file-system.probe
Binary file not shown.
127 changes: 72 additions & 55 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ qwhitelist:
bot: hello-bot
# GroupID
group: hello-group
# 检查是否在群内
# 若存在白名单但不在群内则视为无
check-if-on-group: true
# 自助申请白名单
self-application:
# 功能开关
Expand All @@ -322,6 +325,8 @@ qwhitelist:
# 内置占位符:
# - %name% 玩家名(只能设置一个)
format: "!申请白名单 %name%"
# 限制每个QQ只能拥有一个白名单
a-qq-only-an-account: true
```
</details>
Expand Down Expand Up @@ -449,14 +454,15 @@ demo-use:

_要触发命令前必须使用前缀`!`或`/`_

| 命令 | 说明 |
|-------------------------------------------------------------|-------------|
| !catsero tps around | 获取TPS(概数) |
| !catsero tps accurate | 获取TPS(精确) |
| !catsero list | 列出服务器上的所有玩家 |
| !catsero whitelist add \<Player> | 添加白名单 |
| !catsero whitelist change \<PlayerOldName> \<PlayerNewName> | 更新白名单 |
| !catsero whitelist remove \<Player> | 移除白名单 |
| 命令 | 说明 |
|------------------------------------------------------------------|-------------|
| !catsero tps around | 获取TPS(概数) |
| !catsero tps accurate | 获取TPS(精确) |
| !catsero list | 列出服务器上的所有玩家 |
| !catsero whitelist add \<Player> | 添加白名单 |
| !catsero whitelist change name \<PlayerOldName> \<PlayerNewName> | 更新白名单 |
| !catsero whitelist change qq \<QQ> \<QQ> | 更新白名单 |
| !catsero whitelist remove \<Player> | 移除白名单 |

<!--
| !catsero pm ban \<player> \(reason) | 封禁一个玩家 |
Expand Down
21 changes: 18 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
}

group = "moe.xmcn.catsero"
version = "2.1"
version = "2.2"

repositories {
mavenCentral()
Expand All @@ -18,16 +18,21 @@ repositories {
}

dependencies {
// 本地
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))

// 远程
implementation("org.spigotmc:spigot-api:1.13-R0.1-SNAPSHOT")
implementation("org.bstats:bstats-bukkit:3.0.0")
implementation("me.clip:placeholderapi:2.11.2")
implementation("io.github.dreamvoid:MiraiMC-Bukkit:1.7.1")
implementation("com.alibaba:fastjson:2.0.22")
implementation("com.github.CroaBeast:AdvancementInfo:2.0.2")
implementation("com.zaxxer:HikariCP:4.0.3")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.1")
implementation("me.zhenxin:qqbot-sdk:1.2.0")

testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.2")
testImplementation(kotlin("test"))
}

Expand All @@ -37,9 +42,19 @@ tasks.getByName<Test>("test") {

tasks.compileJava {
options.encoding = "UTF-8"
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}
tasks.compileTestJava {
options.encoding = "UTF-8"
sourceCompatibility = JavaVersion.VERSION_1_8.toString()
targetCompatibility = JavaVersion.VERSION_1_8.toString()
}
tasks.compileKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
}
tasks.compileTestKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_1_8.toString()
}

// 替换资源文件的Tokens`config.groovy`
Expand Down
2 changes: 1 addition & 1 deletion config.groovy
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
environments {
prod {
plugin {
version = "2.1"
version = "2.2"
}
}
}
5 changes: 4 additions & 1 deletion src/main/java/moe/xmcn/catsero/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -426,12 +426,14 @@ interface QWHITELIST {
String sub_node = "qwhitelist" + ".";

boolean ENABLE = CFI.uses_config.getBoolean(sub_node + "enable");
boolean CHECK_IF_ON_GROUP = CFI.uses_config.getBoolean(sub_node + "check-if-on-group");

interface SELF_APPLICATION {
String sub_node = "qwhitelist.self-application" + ".";

boolean ENABLE = CFI.uses_config.getBoolean(sub_node + "enable");
String format = CFI.uses_config.getString(sub_node + "format");
String FORMAT = CFI.uses_config.getString(sub_node + "format");
boolean A_QQ_ONLY_AN_ACCOUNT = CFI.uses_config.getBoolean(sub_node + "a-qq-only-an-account");
}

interface MIRAI {
Expand Down Expand Up @@ -539,6 +541,7 @@ interface QWHITELIST {
String CHANGE_SUCCESS = qwhitelist.getString("change-success");
String CHANGE_ERROR_SQL = qwhitelist.getString("change-error-sql");
String CHANGE_ERROR_NOT_FOUND = qwhitelist.getString("change-error-not-found");
String AQOAA_ERROR_REPEAT = qwhitelist.getString("aqoaa-error-repeat");
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/moe/xmcn/catsero/utils/QPS.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public interface QPS {

/**
* 解析命令
*
* @param message 接收消息原文
* @param command 命令名称
* @return 解析后的数组,如果解析失败则直接返回null
Expand Down
Loading

0 comments on commit 4bed20f

Please sign in to comment.