Skip to content

Instantly share code, notes, and snippets.

@Omattyao
Last active January 1, 2016 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Omattyao/8150316 to your computer and use it in GitHub Desktop.
Save Omattyao/8150316 to your computer and use it in GitHub Desktop.
<?php
/*
__PocketMine Plugin__
name=ExamplePlugin
version=0.0.1
author=shoghicp
class=ExamplePlugin
apiversion=10
*/
class ExamplePlugin implements Plugin{
private $api;
public function __construct(ServerAPI $api, $server = false){
$this->api = $api;
}
public function init(){
$this->api->console->register("pos", "setumei", array($this, "commandH"));
}
public function commandH($cmd, $params, $issuer, $alias) {
$x = $issuer->entity->x;
$y = $issuer->entity->y;
$z = $issuer->entity->z;
}
public function __destruct(){
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment