This repository has been archived on 2025-12-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
RunBroker/README.md
2025-04-28 23:54:30 +08:00

134 lines
4.1 KiB
Markdown

# 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>"
}
```
> The latest plugin can be found at https://pkg.rtast.cn/#/releases/cn/rtast/runbroker/cn.rtast.runbroker.gradle.plugin
# Configure plugin
## Run broker its self
```kotlin
runBroker {
// This path is the Broker its self bootstrap jar file path, once if run
// successful this config is not necessary, because plugin will copy
// this file to `run` dir
brokerBootstrapPath = "C:\\Users\\RTAkl\\Downloads\\afybroker-server-bootstrap-2.4-all.jar"
// 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 {
// Broker bukkit plugin path
brokerBukkitPluginPath = "C:\\Users\\RTAkl\\Downloads\\afybroker-bukkit-2.4-all.jar"
// Broker bungeecord plugin path
brokerBungeeCordPluginPath = "C:\\Users\\RTAkl\\Downloads\\afybroker-bungee-2.4-all.jar"
// 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>
# 中文版本
此插件可以让你快速的运行Broker及其一系列的自服务, 例如bungeecord、bukkit子服等
配置插件的话就按照上面的配置
# 开源
- 本项目以[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>