Advertisement
Guest User

Untitled

a guest
Jun 15th, 2014
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. __PocketMine Plugin__
  5. class=p49XhaiB
  6. name=KitPvP
  7. author=SkyrexMC
  8. version=1.0
  9. apiversion=12
  10. */
  11.  
  12. class p49XhaiB implements plugin{
  13.  
  14.     private $api;
  15.    
  16.    
  17. public function __construct(ServerAPI $api, $s = false){$this->api=$api;}
  18.  
  19. public function init(){$this->api->addHandler("player.block.touch", array($this, "eventHandler"), 100);
  20.  
  21. }
  22.  
  23. public function eventHandler($data){switch($event)
  24. {
  25. case "player.block.touch":
  26.  
  27. if($data["item"]->getID() === BEETROOT_SOUP){ $data["player"]->entity->heal(5);}
  28. }
  29.  
  30. }
  31.  
  32. public function __destruct()
  33. {
  34. }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement