Advertisement
Guest User

Untitled

a guest
Mar 26th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. <?php
  2. namespace chanel;
  3.  
  4. use pocketmine\plugin\PluginBase;
  5. use pocketmine\event\Listener;
  6. use pocketmine\event\player\PlayerChatEvent;
  7. use pocketmine\command\Command;
  8. use pocketmine\command\CommandSender;
  9.  
  10. class chanel extends PluginBase implements Listener{
  11.  
  12. public function onCommand(CommandSender $sender, Command $cmd, $label, array $args){
  13. if($cmd == 'join'){
  14. if(isset($args[0])) return($sender->sendMessage("§cВведите цифры от 1 до 2!"));
  15. switch ($args[0]){
  16. case 1:
  17. case 2:
  18. default: $sender->sendMessage("§cВведите цифры от 1 до 2!"); break;
  19. }
  20. }
  21. }
  22.  
  23. public function onEnable(){
  24.  
  25. $this->getServer()->getPluginManager()->registerEvents($this, $this);
  26.  
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement