Skip to content

Fully tested PHP library to send commands to a Minecraft Server.

License

Notifications You must be signed in to change notification settings

gries/minecraft-commander

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minecraft-commander

This is a library to send commands (http://minecraft.gamepedia.com/Commands) to a minecraft-server and parse their output.

SensioLabsInsight

Build Status

Installation

minecraft-commander can be installed via. Composer:

composer require "gries/minecraft-commands"

Basic usage

use gries\Minecraft\Commander\CommanderFactory;

require_once __DIR__ . '/../vendor/autoload.php';

// create a Commander
$commander = CommanderFactory::create('example.com', 25575, 'mypass');

// set the server-time
$commander->setTime('12000');

// listPlayers
$players = $commander->listPlayers();

print_r($players);

echo $commander->raw('seed');

Currently these Commands are available for the Commander

  • say
  • listPlayers
  • locatePlayer
  • teleport
  • give
  • setWeather
  • setTime
  • setBlock
  • raw

Running the tests

bin/phpspec run

Contribute!

Feel free to give me feedback/feature-request/bug-reports via. github issues. Or just send me a pull-request :)

Author

License

For the full copyright and license information, please view the LICENSE file that was distributed with this source code.

About

Fully tested PHP library to send commands to a Minecraft Server.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages