我为一个服务器网络创建了这个核心,他们慷慨地允许我将其公开,因此我将所有的 DabCore 和 ChatAPI 整合其中以使其更加完善。此插件本身不具备任何功能,必须由其他插件激活才能运行。
这是我所有插件的核心。它将帮助我的所有插件发挥最佳性能。
在更新/安装此插件之前,请先停止服务器,然后进行安装或更新,以免导致我的其他插件出现故障。
ChatAPI:
带注释的示例代码:
此部分将很快更新
public class Example{
// 首先,建议创建一个用于发送 JSONFormatter 的方法
protected void send(JSONFormatter jf, Player player){
// 这允许数据包通过
PacketListener.getInstance().allow(player, jf.getSize());
// 这发送数据包
jf.send(player);
}
// 另一个有用的方法是阻止聊天数据包发送给玩家
protected void pause(Player player){
PacketListener.getInstance().getListener().pause(player);
}
// 以及当玩家完成 GUI 操作后恢复其聊天的方法
protected void play(Player player){
// 这将向玩家重新发送最后 100 条聊天数据包,如果只有
// 50 条需要发送,
// 则会先发送 50 条空数据包
PacketListener.getInstance().getListener().play(player);
}
// 基础发送方法
public void send(Player player){
// 是否启用换行符
// 某些 Minecraft 版本不支持换行 "\n"
// 最好在配置文件中设置启用/禁用此功能的选项
boolean newlines = false;
JSONFormatter jf = new JSONFormatter(newlines);
// 追加字符串
// 一些漂亮的标题
jf.append("--------------");
// 这会添加一个新行
jf.newLine();
jf.append(" ");
// 追加带有点击事件的文本
// 点击事件是指玩家在聊天中点击时发生的行为
// 有 RunCommandEvent(执行命令)或 SuggestCommandEvent(建议命令)
jf.appendClick(ChatColor.GREEN + "< Back", new RunCommandEvent("<command>" + " back"));
jf.newLine();
jf.newLine();
jf.append(" " + ChatColor.RED + "Unsupported file");
// 还有悬停事件
// 有 ShowAchievementEvent、ShowItemEvent 和 ShowTextEvent
jf.appendHover("Example", new ShowTextEvent("Hover"));
// 仅重置聊天颜色
jf.resetColors();
// 重置修饰符(斜体、粗体等)
jf.resetModifiers();
// 重置两者,调用 .newLine 也会重置所有内容
jf.resetAll();
// 添加 15 个空行
// 聊天 GUI 的高度最多为 20 行,并且你希望它看起来整齐美观
jf.newLine(15);
jf.append("--------------");
// 调用前面创建好的发送方法
send(jf, player);
// JSONFormatter 支持链式调用,从而允许编写非常紧凑的代码
jf.append("--------------").newLine()
.append(" ").appendClick(ChatColor.GREEN + "< Back", new RunCommandEvent("<command>" + " back")).newLine().newLine()
.append(" " + ChatColor.RED + "Unsupported file")
.newLine(15)
.append("--------------");
}
}
这将生成类似以下内容:

示例视频:
I created this core for a network, and they have nicely allowed me to make it public, so I put all my DabCore and ChatAPI into it to make it better. This plugin does nothing by itself and has to be activated by other plugins.
This is the core for all my plugins. This will help all my plugins function at their best.
Before updating/installing this plugin stop the server and then install/update it, so my other plugins will not break.
ChatAPI:
Example code with explinations:
This will be updated soon
public class Example{
// Firstly i recommend creating a method to send the JSONFormatter
protected void send(JSONFormatter jf, Player player){
// This allows the packets to go through
PacketListener.getInstance().allow(player, jf.getSize());
// This sends the packets
jf.send(player);
}
// Another good method to have is one that stops chat packets from being
// sent to the player
protected void pause(Player player){
PacketListener.getInstance().getListener().pause(player);
}
// And also one that restores the players chat after they have finished with
// the gui
protected void play(Player player){
// This will resend the last 100 chat packets to player, if there is
// only 50 to send,
// then it will first send 50 blank packets
PacketListener.getInstance().getListener().play(player);
}
// Basic send method
public void send(Player player){
// Whether newlines are enabled or not
// Some minecraft version do not support new lines "\n"
// It is best to have a setting in the config file to enable/disable this
boolean newlines = false;
JSONFormatter jf = new JSONFormatter(newlines);
// Append a string
// Some nice header
jf.append("--------------");
// This adds a new line
jf.newLine();
jf.append(" ");
// Append a message with a click event
// A click event is what happens when the player clicks it in their chat
// There is RunCommandEvent or SuggestCommandEvent
jf.appendClick(ChatColor.GREEN + "< Back", new RunCommandEvent("<command>" + " back"));
jf.newLine();
jf.newLine();
jf.append(" " + ChatColor.RED + "Unsupported file");
// There is also a hover event
// There is ShowAchievementEvent, ShowItemEvent and ShowTextEvent
jf.appendHover("Example", new ShowTextEvent("Hover"));
// Resets just chat colors
jf.resetColors();
// Resets modifiers (italic, bold etc;)
jf.resetModifiers();
// Resets both, calling .newLine also resets all
jf.resetAll();
// Adds 15 blank lines
// The Chat GUI can only be 20 lines high and you want it to be flush as to look nice
jf.newLine(15);
jf.append("--------------");
// Calls the send method created earlier
send(jf, player);
// The JSONFormatter allows chaining which allows for very compact code
jf.append("--------------").newLine()
.append(" ").appendClick(ChatColor.GREEN + "< Back", new RunCommandEvent("<command>" + " back")).newLine().newLine()
.append(" " + ChatColor.RED + "Unsupported file")
.newLine(15)
.append("--------------");
}
}
This produces something like:

Example video:
版本游戏版本平台发布时间本站下载
正式版
0.6.8-RELEASE
1.21.111.21.10 7 个月前 ·
0
1.21.11
1.21.10
1.21.9
1.21.8, 1.21.7, 1.21.6, 1.21.5, 1.21.4, 1.21.3, 1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17, 1.16, 1.15, 1.14, 1.13
下载 Core - Dablakbandit
版本:0.6.8-RELEASE
游戏版本:1.21.11、1.21.10、1.21.9 等
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
正式版
0.6.7-RELEASE
1.21.81.21.7 1 年前 ·
0
1.21.8
1.21.7
1.21.6
1.21.5, 1.21.4, 1.21.3, 1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17, 1.16, 1.15, 1.14, 1.13
下载 Core - Dablakbandit
版本:0.6.7-RELEASE
游戏版本:1.21.8、1.21.7、1.21.6 等
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
正式版
0.6.6-RELEASE
1.21.51.21.4 1 年前 ·
0
1.21.5
1.21.4
1.21.3
1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17, 1.16, 1.15, 1.14, 1.13
下载 Core - Dablakbandit
版本:0.6.6-RELEASE
游戏版本:1.21.5、1.21.4、1.21.3 等
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
正式版
0.6.5-RELEASE
1.21.51.21.4 1 年前 ·
0
1.21.5
1.21.4
1.21.3
1.21.2, 1.21.1, 1.21, 1.20.6, 1.20.5, 1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17, 1.16, 1.15, 1.14, 1.13
下载 Core - Dablakbandit
版本:0.6.5-RELEASE
游戏版本:1.21.5、1.21.4、1.21.3 等
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
正式版
0.6.4
1.211.20.6 2 年前 ·
0
1.21
1.20.6
1.20.5
1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17, 1.16, 1.15, 1.14, 1.13
下载 Core - Dablakbandit
正式版
0.6.3
1.211.20.6 2 年前 ·
0
1.21
1.20.6
1.20.5
1.20.4, 1.20.3, 1.20.2, 1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17, 1.16, 1.15, 1.14, 1.13
下载 Core - Dablakbandit
正式版
0.6.2
1.20.41.20.3 2 年前 ·
0
1.20.4
1.20.3
1.20.2
1.20.1, 1.20, 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17, 1.16, 1.15, 1.14, 1.13, 1.12, 1.11, 1.10, 1.9, 1.8.3, 1.7.4, 1.6.4
下载 Core - Dablakbandit
正式版
0.6.1
1.20.21.20.1 2 年前 ·
0
1.20.2
1.20.1
1.20
1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17, 1.16, 1.15, 1.14, 1.13, 1.12, 1.11, 1.10, 1.9, 1.8.1, 1.8, 1.7.4, 1.6.4
下载 Core - Dablakbandit
正式版
0.6.0
1.20.21.20.1 3 年前 ·
0
1.20.2
1.20.1
1.20
1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17, 1.16, 1.15, 1.14, 1.13, 1.12, 1.11, 1.10, 1.9, 1.8.1, 1.8
下载 Core - Dablakbandit
正式版
0.5.9
1.20.11.20 3 年前 ·
0
1.20.1
1.20
1.19.4
1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17, 1.16, 1.15, 1.14, 1.13, 1.12, 1.11, 1.10, 1.9, 1.8.1, 1.8
下载 Core - Dablakbandit
0.6.8-RELEASE
正式版
2026-04-05
添加对 26.1+ 的支持
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
数据包事件PacketEvents
retrooper
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
前置科技
46
插件
ExyliaLib
ExyliaServices
ExyliaPlugins 的库。
前置实用
26
插件
Vivecraft Spigot Extension
fayer3
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
前置实用
12
插件
WorldEdit
me4502
一个在游戏内运行的 Minecraft 地图编辑器! 支持选区、蓝图、复制粘贴、笔刷和脚本。 可在创造模式中使用,也可在生存模式中临时使用。
前置管理
10
插件
BentoBox
tastybento
SkyBlock、OneBlock、Boxed、SkyGrid、AcidIsland、CaveBlock、Poseidon、StrangerRealms——以及更多!这些只是由 BentoBox 支持的基于岛屿的游戏模式之一。来自原版 ASkyBlock 的作者。
玩法机制小游戏
10
插件
UltimateAdvancementAPI
frengor
一个强大的 API,用于为你的 Minecraft 服务器创建自定义进度。
前置实用
10
评论 0
登录后参与评分
还没有评论,来抢沙发吧