定制 goldman40/php-rcon-minecraft 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

goldman40/php-rcon-minecraft

Composer 安装命令:

composer require goldman40/php-rcon-minecraft

包简介

Send commands from php to minecraft

README 文档

README

Simple Rcon class for php.

Connection is established over TCP.

Available on https://packagist.org/packages/goldman40/php-rcon-minecraft

Examples

For this script to work, rcon must be enabled on the server, by setting enable-rcon=true in the server's server.properties file. A password must also be set, and provided in the script.

use thedudeguy\Rcon;

$host = 'some.minecraftserver.com'; // Server host name or IP
$port = 25567;                      // Port rcon is listening on
$password = 'server-rcon-password'; // rcon.password setting set in server.properties
$timeout = 3;                       // How long to timeout. Default 3

$rcon = new Rcon($host, $port, $password, $timeout);

if ($rcon->connect())
{
  $rcon->send_command("say Hello World!");
}

统计信息

  • 总下载量: 316
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 57
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-04