DangoTown / RCONLib

使用Kotlin编写的RCON库来连接到服务器

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RCONLib

简介

  • 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
}

About

使用Kotlin编写的RCON库来连接到服务器

License:Apache License 2.0


Languages

Language:Kotlin 100.0%