Rcon API to send commands from the website to the Minecraft server.
The extension only provides the API and the function to add Rcon connections. It does not provide any other functions on its own
Servers can be entered in the ACP under Configuration -> Miscellaneous -> Rcon Connections.
Usage:
XML: package.xml
<requiredpackage minversion="2.1.0">de.fabihome.minecraft.rcon.api</requiredpackage>
PHP: MyAction.class.php
<?php
namespace wcf\action;
use wcf\system\rcon\RconConnect;
class MyAction extends AbstractAction {
public function execute() {
parent::execute();
$rconID = 1;
$command = 'give MinecraftPlayer dirt 10'
$response = RconConnect::send($rconID, $command);
echo $response;
}
}
Display More