1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Faction egg

Discussion in 'Requests' started by dragonflex, Mar 12, 2017.

  1. dragonflex

    dragonflex Spider Jockey

    Messages:
    44
    what to do after the destruction of block foam. removed the guild area?

    PHP:
    <?php

    namespace JajoGildi;

    use 
    pocketmine\plugin\PluginBase as P;
    use 
    pocketmine\event\Listener as L;
    use 
    pocketmine\utils\TextFormat;
    use 
    pocketmine\utils\MainLogger;
    use 
    pocketmine\block\Air;
    use 
    pocketmine\Server;
    use 
    pocketmine\event\block\BlockBreakEvent as BBL;
    use 
    pocketmine\block\Block;
    use 
    pocketmine\math\Vector3;
    use 
    pocketmine\item\Item;
    use 
    pocketmine\command\CommandSender;
    use 
    pocketmine\command\Command;
    use 
    pocketmine\command\ConsoleCommandSender;

    class 
    Main extends implements L{
       
           public function 
    getAPI()
        {
            return 
    Server::getInstance()->getPluginManager()->getPlugin("FactionsPro");
        }
       
        public function 
    onEnable(){
            
    $this->getServer()->getPluginManager()->registerEvents($this,$this);
            
    $this->getServer()->getLogger()->info(TextFormat::GREEN."[JajoGildi] Włączony!");
        }

        public function 
    onBreak(BBL $e){
            
    $player $e->getPlayer();
            
    $block $e->getBlock();
            
    $gracz $e->getPlayer()->getName();
            
    $gildiaa $this->getAPI()->getPlayerFaction($name);
            if(
    $e->getBlock()->getId() == 19){
                switch(
    mt_rand(1,1)){
             case 
    1:        
             
    $gildia "g opusun ".$gildiaa."";
            
    $this->getServer()->dispatchCommand(new ConsoleCommandSender,$gildia);
             
    $player->sendMessage("§7 • §8[§cGildie§8]§7 Jajo gildi - (§c".$gildiaa."§7) zostało zniszczone • ");
             
    $e->setCancelled();
             break;
                }
            }
        }
    }
     
  2. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    Wrong section for that. Should be in the development section.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.