plugin-api 是一个用 Kotlin 编写的多功能插件工具库,旨在为 Spigot 插件开发提供一系列强大且类型安全的 API,涵盖事件处理、GUI、命令框架、配置管理等常见需求,并内置了 Kotlin 标准库和协程支持,以简化开发流程。
kotlin-stdlib-jdk8、kotlin-reflect 和 kotlinx-coroutines-core 库。要使用依赖于此 API 的插件,你需要先安装其运行时库。
plugin-api 的运行时 JAR 文件。/plugins/ 目录中。/plugins/ 目录下。该库分为五个功能模块,每个模块都依赖于 common 模块。你可以根据需要引入特定的模块。
以下是使用不同构建工具的配置示例。
repositories {
mavenCentral()
maven { url 'https://gitlab.com/api/v4/projects/10077943/packages/maven' }
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
dependencies {
compileOnly 'org.spigotmc:spigot-api:1.18.1-R0.1-SNAPSHOT'
compileOnly 'io.github.commandertvis:chat-components:18.0.0'
compileOnly 'io.github.commandertvis:command:18.0.0'
compileOnly 'io.github.commandertvis:common:18.0.0'
compileOnly 'io.github.commandertvis:coroutines:18.0.0'
compileOnly 'io.github.commandertvis:gui:18.0.0'
}repositories {
mavenCentral()
maven("https://gitlab.com/api/v4/projects/10077943/packages/maven")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://oss.sonatype.org/content/repositories/snapshots")
}
dependencies {
compileOnly("org.spigotmc:spigot-api:1.18.1-R0.1-SNAPSHOT")
compileOnly("io.github.commandertvis:chat-components:18.0.0")
compileOnly("io.github.commandertvis:command:18.0.0")
compileOnly("io.github.commandertvis:common:18.0.0")
compileOnly("io.github.commandertvis:coroutines:18.0.0")
compileOnly("io.github.commandertvis:gui:18.0.0")
}<repositories>
<repository>
<id>pluginApiGitlab</id>
<url>https://gitlab.com/api/v4/projects/10077943/packages/maven</url>
</repository>
<repository>
<id>spigotNexus</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sonatypeOss</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>${spigotApi.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.github.commandertvis.plugin</groupId>
<artifactId>common</artifactId>
<version>18.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.github.commandertvis.plugin</groupId>
<artifactId>command</artifactId>
<version>18.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.github.commandertvis.plugin</groupId>
<artifactId>coroutines</artifactId>
<version>18.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.github.commandertvis.plugin</groupId>
<artifactId>chat-components</artifactId>
<version>18.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.github.commandertvis.plugin</groupId>
<artifactId>gui</artifactId>
<version>${pluginApi.version}</version>
<scope>provided</scope>
</dependency>
</dependencies>CMDR 是一个强大的 Minecraft 插件,它提供了一个直观、灵活的指令系统,旨在简化服务器管理并增强玩家体验。通过其独特的指令链、变量系统和强大的权限控制,管理员可以轻松创建复杂的自动化流程和交互式功能。
if、else、switch 等条件判断,让指令执行更具逻辑性。for、while、foreach 循环,便于处理重复性任务或遍历列表。{set: %player% to "Steve"})。cmdr.command.teleport)。/help - 显示帮助信息。/teleport <player> - 传送至指定玩家。/home set - 设置家的位置。/home - 传送回家。/cmdr reload - 重载插件配置。/cmdr debug - 切换调试模式,查看指令执行详情。/cmdr run <chainName> - 手动执行指定的指令链。CMDR.jar 文件放入服务器的 plugins 文件夹。.yml 格式)。# config.yml 片段
settings:
debug: false
default-language: en
variables:
server-name: "My Awesome Server"
chains:
welcome-message:
- 'tell: &aWelcome to {var:server-name}, %player%!'/cmdr debug 查看执行流程。permission: your.permission.node 即可。确保你的权限管理插件(如 LuckPerms)已正确配置该节点。友情链接: 网易我的世界 | 泰拉瑞亚 | ocent云计算 | 米饭Minecraft插件文档 | 友链合作
历史访问人次:3,101,894 | 今日访问人次:10,058 | 昨日访问人次:22,124
独立 IP:19,220 | 最近24小时独立访客:19,208
Copyright © 2019-2026 我的世界服务器列表站. All rights reserved.
❤ Powered by GermMC 京ICP备17023959号-6