CommandClip
Bukkit 插件的命令框架
依赖
Gradle
repositories {
mavenCentral()
}
dependencies {
compileOnly("io.github.nottamion:commandclip:1.1.0")
}
Maven
<dependency>
<groupId>io.github.nottamion</groupId>
<artifactId>commandclip</artifactId>
<version>1.1.0</version>
</dependency>
为了减小你插件的文件体积,建议让 Spigot 为你下载该框架。这也意味着你无需将框架阴影打包(shade)到你的插件 JAR 中。
plugin.yml
libraries:
- io.github.nottamion:commandclip:1.1.0
用法
文档目前正在构建中,请访问 。
目前请先查看下面的示例。
这是一个利用基本功能的示例:
new BaseCommand("hello", this)
.subCommand(new SubCommand("there")
.executes((commandSender, s, strings) -> {
commandSender.sendMessage(s + " there " + strings[0]);
})
.tabCompletes((commandSender, s, strings) -> strings.length == 1 ? Bukkit.getOnlinePlayers().stream().map(Player::getName).toList(): List.of())
.testArgs((commandSender, s, strings) -> {
if (strings.length != 1)
return "Please provide a valid playername";
if (!Bukkit.getOnlinePlayers().stream().map(player -> player.getName()).toList().contains(strings[0]))
return "Player is not online";
return null;
})
.permission("hello.there", "You aren't allowed to get a Welcome :("))
.alias("hi")
.commandDescription("Welcomes you")
.commandPermission("hello")
.register();
你是这个资源的作者?登录后可认领此资源。
相似资源
数据包事件PacketEvents
retrooper
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
前置科技
27
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
登录后参与评分
还没有评论,来抢沙发吧