dongsanhu4784 2015-12-19 17:54
浏览 105

Minecraft服务器查询

Hello im using this PHP script

https://github.com/FunnyItsElmo/PHP-Minecraft-Server-Status-Query

I'm trying to get the names of all the players to show aswell..

On row 65 in the status.class.php i added this print_r($data->players);

And then i get an array with 12 slots or something..

Like this: stdClass Object ( [max] => 35 [online] => 21 [sample] => Array ( [0] => stdClass Object ( [id] => 1 [name] => MinecraftNickname) [1] => stdClass Object ( [id] => 2 [name] => MinecraftNickname) [2] => stdClass Object ( [id] => 3 [name] => MinecraftNickname ) [3] => stdClass Object ( [id] => 4 [name] => MinecraftNickname) [4] => stdClass Object ( [id] => 5 [name] => MinecraftNickname) [5] => stdClass Object ( [id] => 6 [name] => MinecraftNickname) [6] => stdClass Object ( [id] => 7 [name] => MinecraftNickname) [7] => stdClass Object ( [id] => 8 [name] => MinecraftNickname) [8] => stdClass Object ( [id] => 9 [name] => MinecraftNickname) [9] => stdClass Object ( [id] => 10 [name] => MinecraftNickname) [10] => stdClass Object ( [id] => 11 [name] => MinecraftNickname) [11] => stdClass Object ( [id] => 12 [name] => MinecraftNickname) ) )

My question is this:

Even if there is 20 players online at the server this $data->players only shows 12, how can i change this so it shows all the nicknames online at the server?

  • 写回答

1条回答 默认 最新

  • dongwen7730 2018-07-30 12:30
    关注

    The Query can only display whatever the server answers, that is the server only sends 12 players. If you're using Spigot (or it's derivative), you can edit this number in spigot.yml file under settings.sample-count.

    See Spigot Wiki for more information.

    评论

报告相同问题?

悬赏问题

  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)
  • ¥15 基于51单片机的厨房煤气泄露检测报警系统设计
  • ¥15 Arduino无法同时连接多个hx711模块,如何解决?