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

Faction Egg

Discussion in 'Development' started by SzanelGirl, Apr 18, 2017.

  1. SzanelGirl

    SzanelGirl Spider Jockey

    Messages:
    28
    GitHub:
    SzanelGirl
    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. Zuruki

    Zuruki Baby Zombie

    Messages:
    118
    GitHub:
    zuruki
    please, rewrite your message... I don't think anyone understands you :(
     
    jasonwynn10 likes this.
  3. Primus

    Primus Zombie Pigman

    Messages:
    749
    I wonder how old are...
     
    Last edited: Apr 18, 2017
  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.