Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2015
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. <?php
  2.  
  3. namespace megamichiel\MyPlugin;
  4.  
  5. use pocketmine\event\Listener;
  6. use pocketmine\plugin\PluginBase;
  7.  
  8. class MyPlugin extends PluginBase implements Listener {
  9.    
  10.     public function onEnable() {
  11.         $this->getLogger()->info("Plugin enabled :OOO");
  12.         $this->getServer()->getPluginManager()->registerEvents($this, $this);
  13.     }
  14.    
  15.     public function onDisable() {
  16.         $this->getLogger()->warning("Plugin disabled ;cc");
  17.     }
  18.    
  19.     public function onCommand($sender, $command, $label, $args) {
  20.         if(strtolower($command->getName()) == "test") {
  21.             $str = "";
  22.             foreach($args as $arg) {
  23.                 $str += $args + " ";
  24.             }
  25.            
  26.             unset($arg);
  27.             $sender->sendMessage("HELLO NURD, YOUR ARGS ARE " + strtoupper($str));
  28.             return true;
  29.         }
  30.         return false;
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement