Created
December 28, 2013 14:51
-
-
Save Omattyao/8160224 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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) { | |
if ($issuer instanceof Player) { | |
$x = $issuer->entity->x; | |
$y = $issuer->entity->y; | |
$z = $issuer->entity->z; | |
$name = $issuer->username; | |
$issuer->sendChat("$nameの座標は x:$x y:$y z:$z です"); | |
} | |
} | |
public function __destruct(){ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment