mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Implemented Plugin Interface
This commit is contained in:
parent
00fea6461c
commit
987a6e635e
4 changed files with 22 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ class=ReactorAsWater
|
|||
*/
|
||||
|
||||
|
||||
class ReactorAsWater{
|
||||
class ReactorAsWater implements Plugin{
|
||||
private $api;
|
||||
public function __construct($api, $server = false){
|
||||
$this->api = $api;
|
||||
|
|
@ -20,7 +20,10 @@ class ReactorAsWater{
|
|||
$this->api->addHandler("player.block.action", array($this, "handle"), 15); //Priority higher that API
|
||||
$this->api->addHandler("player.equipment.change", array($this, "handle"), 15);
|
||||
}
|
||||
|
||||
|
||||
public function __destruct(){
|
||||
|
||||
}
|
||||
|
||||
public function handle(&$data, $event){
|
||||
switch($event){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue