1
0
mirror of https://e.coding.net/circlecloud/YumCore.git synced 2025-09-03 11:46:58 +00:00

feat: 新增MC服务器PING解析类

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
2017-09-29 13:09:11 +08:00
parent 6ea90b46ff
commit 9ae8b285e6
4 changed files with 351 additions and 104 deletions

View File

@ -0,0 +1,22 @@
package pw.yumc.YumCore.mc;
import org.junit.Test;
import lombok.val;
import pw.yumc.YumCore.bukkit.Log;
/**
* Created with IntelliJ IDEA
*
* @author 喵♂呜
* Created on 2017/9/29 13:05.
*/
public class ServerPingTest {
@Test
public void test() {
val ping = new ServerPing("server.yumc.pw");
ping.fetchData();
Log.i("version: %s max: %s online: %s motd: %s",
ping.getVersionName(), ping.getPlayersMax(), ping.getPlayersOnline(), ping.getMotd());
}
}