Guest User

AWESOME CODE

a guest
Oct 21st, 2014
78
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. __PocketMine Plugin__
  4. name=fall
  5. description=Teleports you to coords 100,1000,100
  6. version=1.0
  7. author=MegaSamNinja
  8. class=fall
  9. apiversion=12
  10. */
  11. class Fall implements Plugin{
  12.    private $api;
  13.    
  14.    public function __construct(ServerAPI $api, $server = false){
  15.      $this->api = $api;
  16.    }
  17.    
  18.     public function init(){
  19.     $this->api->console->register("fall", "Sends the person in space", array($this, "fall"));
  20.     $this->api->ban->cmdwhitelist("fall");
  21.     $this->path = $this->api->plugin->configPath($this);
  22.     $this->config = new Config($this->path . "Fall.yml", CONFIG_YAML, array("Jail" => "This will be used in a later version"));
  23.     }
  24.      
  25.     public function fall($cmd, $args, $issuer){
  26.     $username = $issuer->username;
  27.     $this->api->console->run("tp " . $username . " 100 1000 100", "console");
  28.     $this->api->chat->sendTo(false, "You have been TELEPORTED by MAGIC", $username);
  29.    }
  30.    
  31.    public function __destruct(){
  32.    }
  33. }
RAW Paste Data