2025-04-28 23:54:30 +08:00
|
|
|
# RunBroker
|
|
|
|
|
|
|
|
|
|
This plugin can run AfyBroker(Broker) quickly, like run bungeecord, multiple subserver and broker its self.
|
|
|
|
|
|
|
|
|
|
Broker is a distributed program if change or found a bug, you need to upload the jar by hand.
|
|
|
|
|
|
|
|
|
|
I'm lazy guy so, I made this gradle plugin, just double-click the tasks and waiting for server to start, that's all
|
|
|
|
|
|
|
|
|
|
# Usage
|
|
|
|
|
|
|
|
|
|
This plugin has to part:
|
|
|
|
|
1. Run broker its self
|
|
|
|
|
2. Run the bukkit subservers and BungeeCord
|
|
|
|
|
|
|
|
|
|
Before use this plugin, you need to configure the maven repository of RTAST(Actually it's my maven repository),
|
|
|
|
|
and configure `shadow` plugin.
|
|
|
|
|
|
|
|
|
|
Configure the maven repository in your `build.gradle.kts` and `settings.gradle.kts`
|
|
|
|
|
|
|
|
|
|
```kotlin
|
|
|
|
|
// settings.gradle.kts
|
|
|
|
|
pluginManagement {
|
|
|
|
|
repositories {
|
|
|
|
|
mavenCentral()
|
|
|
|
|
mavenLocal()
|
|
|
|
|
gradlePluginPortal()
|
|
|
|
|
// Add this line
|
|
|
|
|
maven("https://repo.maven.rtast.cn/releases/")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// build.gradle.kts
|
|
|
|
|
allprojects {
|
|
|
|
|
repositories {
|
|
|
|
|
mavenCentral()
|
|
|
|
|
// Add this line
|
|
|
|
|
maven("https://repo.maven.rtast.cn/releases/")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Run Broker its self
|
|
|
|
|
|
|
|
|
|
```kotlin
|
|
|
|
|
plugins {
|
|
|
|
|
// Must be added
|
|
|
|
|
id("com.gradleup.shadow") version "8.3.1"
|
|
|
|
|
id("cn.rtast.runbroker") version "<version>"
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Run BungeeCord or bukkit subservers
|
|
|
|
|
|
|
|
|
|
```kotlin
|
|
|
|
|
plugins {
|
|
|
|
|
// Must be added
|
|
|
|
|
id("com.gradleup.shadow") version "8.3.1"
|
|
|
|
|
id("cn.rtast.runbroker-subserver") version "<version>"
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2025-04-29 00:00:00 +08:00
|
|
|
> The latest version of plugin can be found at https://pkg.rtast.cn/#/releases/cn/rtast/runbroker/cn.rtast.runbroker.gradle.plugin
|
2025-04-28 23:54:30 +08:00
|
|
|
|
|
|
|
|
# Configure plugin
|
|
|
|
|
|
|
|
|
|
## Run broker its self
|
|
|
|
|
|
|
|
|
|
```kotlin
|
|
|
|
|
runBroker {
|
2025-04-29 14:11:15 +08:00
|
|
|
// The download url of the Broker its self bootstrap jar, if you want to use the default, just delete this line
|
|
|
|
|
brokerBootstrapDownloadUrl = "C:\\Users\\RTAkl\\Downloads\\afybroker-server-bootstrap-2.4-all.jar"
|
2025-04-28 23:54:30 +08:00
|
|
|
// the java path, by default plugin will use jdk of project, just delete this line to use the default jdk
|
|
|
|
|
javaExecPath = cn.rtast.runbroker.common.JavaExecPath("path/to/java/binary")
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Run Bungeecord and others
|
|
|
|
|
|
|
|
|
|
```kotlin
|
|
|
|
|
runBrokerSubserver {
|
2025-04-29 14:11:15 +08:00
|
|
|
// Broker bukkit plugin path, if you want to use the default, just delete this line
|
|
|
|
|
brokerBukkitPluginDownloadUrl = "..."
|
|
|
|
|
// Broker bungeecord plugin download url, if you want to use the default, just delete this line
|
|
|
|
|
brokerBungeeCordPluginDownloadUrl = "..."
|
2025-04-28 23:54:30 +08:00
|
|
|
// minecraft server core path, also all the path configs are one-time
|
|
|
|
|
minecraftServerPath = "E:\\hhwork\\NoobSpigot\\noob-server\\build\\libs\\noob-bundler-1.21.4-R0.1-SNAPSHOT-mojmap.jar"
|
|
|
|
|
// the subserver count, set to 2 will generate two tasks that can run multiple server instances by default it's 2
|
|
|
|
|
subServerCount = 2
|
|
|
|
|
// the java path, by default plugin will use jdk of project, just delete this line to use the default jdk
|
|
|
|
|
javaExecPath = cn.rtast.runbroker.common.JavaExecPath("path/to/java/binary")
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# Licenses
|
|
|
|
|
|
|
|
|
|
- This project is open source under [Apache-2.0](./LICENSE) license, that is:
|
|
|
|
|
- You can directly use the functions provided by this project without any authorization
|
|
|
|
|
- You can distribute, modify and derive the source code at will under the condition of **indicating the source
|
|
|
|
|
copyright information**
|
|
|
|
|
|
|
|
|
|
# Special thanks
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
|
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.png" alt="JetBrainsIcon" width="128">
|
|
|
|
|
|
|
|
|
|
<a href="https://www.jetbrains.com/opensource/"><code>JetBrains Open Source</code></a> provided the powerful IDE support
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
# 中文版本
|
|
|
|
|
|
2025-04-29 00:09:13 +08:00
|
|
|
此插件可以让你快速的运行Broker及其一系列的服务, 例如bungeecord、bukkit子服等
|
2025-04-28 23:54:30 +08:00
|
|
|
|
|
|
|
|
配置插件的话就按照上面的配置
|
|
|
|
|
|
|
|
|
|
# 开源
|
|
|
|
|
|
|
|
|
|
- 本项目以[Apache-2.0](./LICENSE)许可开源, 即:
|
|
|
|
|
- 你可以直接使用该项目提供的功能, 无需任何授权
|
|
|
|
|
- 你可以在**注明来源版权信息**的情况下对源代码进行任意分发和修改以及衍生
|
|
|
|
|
|
|
|
|
|
# 鸣谢
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
|
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.png" alt="JetBrainsIcon" width="128">
|
|
|
|
|
|
|
|
|
|
<a href="https://www.jetbrains.com/opensource/"><code>JetBrains Open Source</code></a> 提供的强大IDE支持
|
|
|
|
|
|
|
|
|
|
</div>
|