-
Kotlin实现的RCON库可以连接服务器并远程管理.
-
一个实例可以连接一个服务器, 连接多个服务器需要创建多个实例.
-
代码太简单直接翻源码就可以知道怎么使用了
maven { url 'https://jitpack.io' }
dependencies {
implementation 'com.github.DangoTown:RCONLib:$version'
}
fun main() {
val rcon = RCon()
rcon.authenticate("this is a password")
val response = rcon.executeCommand("list")
println(response) // or println(response.body) # override toString method to directly print body filed
}