From 1b47a716d3b35080d2ce0248e512782ec6085a7f Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Wed, 26 Dec 2012 03:01:21 +0100 Subject: [PATCH] Updated plugins --- example/ExamplePlugin.php | 2 +- example/ReactorAsWater.php | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/example/ExamplePlugin.php b/example/ExamplePlugin.php index 1663c9aa6..1ad4f806c 100644 --- a/example/ExamplePlugin.php +++ b/example/ExamplePlugin.php @@ -2,7 +2,7 @@ /* __PocketMine Plugin__ -name=Example Plugin +name=ExamplePlugin version=0.0.1 author=shoghicp class=ExamplePlugin diff --git a/example/ReactorAsWater.php b/example/ReactorAsWater.php index 9f95881cd..701b00ee6 100644 --- a/example/ReactorAsWater.php +++ b/example/ReactorAsWater.php @@ -2,25 +2,23 @@ /* __PocketMine Plugin__ -name=Reactor As Water +name=ReactorAsWater description=Replaces the Nether Reactor with Water -version=0.0.1 +version=0.0.2 author=shoghicp class=ReactorAsWater -api=false */ class ReactorAsWater{ - private $api, $server; + private $api; public function __construct($api, $server = false){ $this->api = $api; - $this->server = $server; } public function init(){ - $this->server->addHandler("player.block.action", array($this, "handle"), 15); //Priority higher that API - $this->server->addHandler("player.equipment.change", array($this, "handle")); + $this->api->addHandler("player.block.action", array($this, "handle"), 15); //Priority higher that API + $this->api->addHandler("player.equipment.change", array($this, "handle"), 15); } @@ -28,7 +26,7 @@ class ReactorAsWater{ switch($event){ case "player.equipment.change": if($data["block"] === 247){ - $this->api->player->getByEID($data["eid"])->eventHandler("[ReactorAsWater] You'll place water with the Nether Reactor", "server.chat"); + $this->api->player->getByEID($data["eid"])->eventHandler("[ReactorAsWater] Placing water", "server.chat"); $data["block"] = 9; $data["meta"] = 0; }