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

Commit

Permalink
Release: 2.4
Browse files Browse the repository at this point in the history
Release: 2.4
  • Loading branch information
XiaMoHuaHuo_CN authored May 13, 2023
2 parents c5f7da4 + 98e83ad commit 1f12329
Show file tree
Hide file tree
Showing 27 changed files with 127 additions and 54 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.
95 changes: 52 additions & 43 deletions .idea/workspace.xml

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

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# CatSero `v2`

[![Codacy Badge](https://app.codacy.com/project/badge/Grade/babcf1e300a44e3684e88840e2b2b803)](https://www.codacy.com/gh/XiaMoHuaHuo-CN/CatSero/dashboard?utm_source=github.com&utm_medium=referral&utm_content=XiaMoHuaHuo-CN/CatSero&utm_campaign=Badge_Grade)[![Gradle - Build](https://github.com/XiaMoHuaHuo-CN/CatSero/actions/workflows/main-build.yml/badge.svg?branch=main)](https://github.com/XiaMoHuaHuo-CN/CatSero/actions/workflows/main-build.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/babcf1e300a44e3684e88840e2b2b803)](https://www.codacy.com/gh/XiaMoHuaHuo-CN/CatSero/dashboard?utm_source=github.com&utm_medium=referral&utm_content=XiaMoHuaHuo-CN/CatSero&utm_campaign=Badge_Grade)[![CodeFactor](https://www.codefactor.io/repository/github/xiamohuahuo-cn/catsero/badge)](https://www.codefactor.io/repository/github/xiamohuahuo-cn/catsero)[![Gradle - Build](https://github.com/XiaMoHuaHuo-CN/CatSero/actions/workflows/main-build.yml/badge.svg?branch=main)](https://github.com/XiaMoHuaHuo-CN/CatSero/actions/workflows/main-build.yml)
一个基于MiraiMC的QQ群功能&MC功能插件
支持的Minecraft版本: 1.8+ **注意: 基于Spigot-1.13.2 API开发,不保证更低版本可用性**
开发版构建结果请前往Actions - [Build](https://github.com/XiaMoHuaHuo-CN/CatSero/actions/workflows/dev-build.yml)
Expand Down
6 changes: 3 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.4-beta"
version = "2.4"

repositories {
maven("https://lss233.littleservice.cn/repositories/minecraft")
Expand All @@ -21,10 +21,10 @@ dependencies {

// 远程
implementation("org.spigotmc:spigot-api:1.13-R0.1-SNAPSHOT")
implementation("org.bstats:bstats-bukkit:3.0.1")
implementation("org.bstats:bstats-bukkit:3.0.2")
implementation("me.clip:placeholderapi:2.11.2")
implementation("io.github.dreamvoid:MiraiMC-Bukkit:1.8-pre1")
implementation("com.alibaba:fastjson:2.0.25")
implementation("com.alibaba:fastjson:2.0.31")
implementation("com.github.CroaBeast:AdvancementInfo:2.0.2")
implementation("com.zaxxer:HikariCP:4.0.3")
implementation("org.geysermc.floodgate:api:2.2.0-SNAPSHOT")
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.4-beta"
version = "2.4"
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/moe/xmcn/catsero/CatSero.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public void onLoad() {
}
*/
if (Configuration.getPlugin().getBoolean(Configuration.buildYaID(
if (Configuration.getUses().getBoolean(Configuration.buildYaID(
Configuration.USESID.QWHITELIST,
new ArrayList<>(Collections.singletonList(
"enable"
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/moe/xmcn/catsero/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public static void saveFiles() {
for (int i = configuration.size() - 1; i >= 0; i--) {
if (!new File(formatPath(configuration.get(i), true)).exists()) {
//Logger.logWARN(cleanPath(configuration.get(i)));
INSTANCE.saveResource(formatPath(configuration.get(i), false), false);
INSTANCE.saveResource(cleanPath(configuration.get(i)/*, false*/), false);
Logger.logLoader("Save: " + cleanPath(configuration.get(i)));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
*/
package moe.xmcn.catsero.executors.catsero;

import moe.xmcn.catsero.CatSero;
import moe.xmcn.catsero.I18n;
import moe.xmcn.catsero.utils.Envrionment;
import moe.xmcn.catsero.utils.Logger;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
Expand Down Expand Up @@ -56,6 +58,9 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
case "debug":
new debug().command(sender, args);
break;
case "help":
Bukkit.getScheduler().runTask(CatSero.INSTANCE, () -> Bukkit.dispatchCommand(sender, "help CatSero"));
break;
default:
sender.sendMessage(ChatColor.translateAlternateColorCodes('&', i18n.getI18n(new ArrayList<>(Arrays.asList(
"minecraft", "command", "invalid-option"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,17 @@ private void run(MiraiGroupMessageEvent e, String message) {
switch (sender_permission) {
case 0:
format = format.replace("%sender_permission%", i18n.getI18n(new ArrayList<>(Arrays.asList(
"minecraft", "call", "member"
"qq", "call", "member"
))));
break;
case 1:
format = format.replace("%sender_permission%", i18n.getI18n(new ArrayList<>(Arrays.asList(
"minecraft", "call", "admin"
"qq", "call", "admin"
))));
break;
case 2:
format = format.replace("%sender_permission%", i18n.getI18n(new ArrayList<>(Arrays.asList(
"minecraft", "call", "owner"
"qq", "call", "owner"
))));
break;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package moe.xmcn.catsero.uses.listeners.heyFriend;

import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;

import java.util.UUID;

public class OnPlayerJoin implements Listener {

@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer();

UUID uuid = player.getUniqueId();
//TODO: SimpleDB
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package moe.xmcn.catsero.uses.listeners.heyFriend;

public class SimpleYamlDB {
//TODO: Read and white file "extra-configs/hey-bind.yml".And make it as a database.
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class WhiteListEditor(
private val groups: List<String> = Configuration.getUseMiraiGroup(ThisID)
) : Listener {

private val i18n = I18n();
private val i18n = I18n()

@EventHandler
fun onGroupMessage(e: OnQQGroupCommandEvent) {
Expand Down
34 changes: 34 additions & 0 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,42 @@ softdepend:
commands:
catsero:
description: "CatSero 基础方法"
usage: "/catsero <version|reload|whitelist|cms>"
subcommands:
version:
description: "插件版本以及信息"
reload:
description: "重载config.yml"
debug:
description: "Debug"
usage: "/catsero debug <子命令>"
subcommands:
readconfig:
description: "读取配置文件节点信息"
usage: "/catsero debug readconfig <config.yml/uses-config.yml> <节点>"
whitelist:
description: "白名单管理"
usage: "/catsero whitelist <子指令>"
subcommands:
add:
description: "添加白名单"
usage: "/catsero whitelist add <Player>"
change:
description: "更新白名单"
usage: "/catsero whitelist change <子指令>"
subcommands:
name:
description: "更新白名单中某个玩家的名称"
usage: "/catsero whitelist change name <PlayerOldName> <PlayerNewName>"
qq:
description: "更新白名单中某个玩家的QQ号码"
usage: "/catsero whitelist change qq <Player> <QQ>"
remove:
description: "移除白名单"
usage: "/catsero whitelist remove <Player>"
cms:
description: "CatSero 发消息到QQ群"
usage: "/cms <BotID> <GroupID> <message>"
permissions:
catsero.*:
description: "CatSero所有权限组"
Expand Down

0 comments on commit 1f12329

Please sign in to comment.