feat: CraftBank Folia 1.21.8 经济与银行核心插件初始实现

实现完整的现金/钱包、银行卡、支票、活期储蓄与定期存款系统,
实现并以 Highest 优先级注册 Vault Economy 接口,接入 PlaceholderAPI。
全程遵循 Folia 调度模型(AsyncScheduler / 实体区域线程),
数据缓存线程安全,支票兑现与定期领取做防刷处理。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Purpur Build
2026-06-29 18:16:06 +08:00
parent 6a5ee9906b
commit eddc706c9a
36 changed files with 3775 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
package com.craftbank.util;
import com.craftbank.CraftBank;
import org.bukkit.command.CommandSender;
/**
* 消息发送辅助。从 config.yml 的 Messages 段读取文案并自动附加前缀。
*/
public final class Msg {
private final CraftBank plugin;
public Msg(CraftBank plugin) {
this.plugin = plugin;
}
public String prefix() {
return Text.color(plugin.getConfig().getString("Messages.prefix", "&8[&b工艺银行&8] &r"));
}
/** 读取 Messages.<key>, 缺失时回退到 def。 */
public String get(String key, String def) {
return Text.color(plugin.getConfig().getString("Messages." + key, def));
}
/** 发送一条带前缀的原始 (已含颜色) 文本。 */
public void send(CommandSender to, String rawColored) {
to.sendMessage(prefix() + rawColored);
}
/** 发送一条带前缀的、应用 & 颜色代码的文本。 */
public void raw(CommandSender to, String text) {
to.sendMessage(prefix() + Text.color(text));
}
/** 发送 Messages.<key> 的内容 (带前缀)。 */
public void key(CommandSender to, String key, String def) {
send(to, get(key, def));
}
}