Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

spawn lightning

Comments in 'Plugin Development' started by Creeperface, Oct 10, 2015.

  1. ItsSuka
    Offline

    ItsSuka Banned

    Joined:
    Nov 6, 2015
    Posts:
    13
    Minecraft User:
    Unknow
    Thannkkk mannn !!!!
  2. Artide
    Offline

    Artide Active Member

    Joined:
    Apr 20, 2015
    Posts:
    214
    Minecraft User:
    Artide5
    Just change AddEntityPacket() to the lightning packet.
  3. ItsSuka
    Offline

    ItsSuka Banned

    Joined:
    Nov 6, 2015
    Posts:
    13
    Minecraft User:
    Unknow
    Crashh my server ...
  4. ItsSuka
    Offline

    ItsSuka Banned

    Joined:
    Nov 6, 2015
    Posts:
    13
    Minecraft User:
    Unknow
    Give me the Plugin plz
  5. CaptainKenji17
    Offline

    CaptainKenji17 Active Member

    Joined:
    Apr 22, 2014
    Posts:
    252
    Minecraft User:
    CaptainKenji17
    with this co
    with this code will it show now to public?
  6. ItsSuka
    Offline

    ItsSuka Banned

    Joined:
    Nov 6, 2015
    Posts:
    13
    Minecraft User:
    Unknow
    Crash my server :'(
  7. Jelly9912
    Offline

    Jelly9912 Active Member

    Joined:
    Aug 8, 2015
    Posts:
    118
    Minecraft User:
    Jelly9912
    Any crash dumps?
  8. ItsSuka
    Offline

    ItsSuka Banned

    Joined:
    Nov 6, 2015
    Posts:
    13
    Minecraft User:
    Unknow
    the plugin is no effect when I kill a player :/ ? Why please ?
  9. ItsSuka
    Offline

    ItsSuka Banned

    Joined:
    Nov 6, 2015
    Posts:
    13
    Minecraft User:
    Unknow
    PHP:
    <?php

    namespace Lightning;

    use 
    pocketmine\Player;
    use 
    pocketmine\Server;
    use 
    pocketmine\entity\Entity;
    use 
    pocketmine\event\Listener;
    use 
    pocketmine\plugin\PluginBase;
    use 
    pocketmine\event\player\PlayerMoveEvent;
    use 
    pocketmine\event\player\PlayerDeathEvent;
    use 
    pocketmine\network\protocol\AddEntityPacket;

    class 
    Lightning extends PluginBase implements Listener{

        public function 
    onEnable(){
            
    $this->getServer()->getPluginManager()->registerEvents($this$this);
        }

        public function 
    onMove(PlayerDeathEvent $e){
            
    $p $e->getEntity();
           if(
    $p instanceof Player) {
             
    $cause $p->getLastDamageCause();
                 if(
    $cause instanceof Player) {
            
    $light = new AddEntityPacket();
            
    $light->type 93;
            
    $light->eid Entity::$entityCount++;
            
    $light->metadata = array();
            
    $light->speedX 0;
            
    $light->speedY 0;
            
    $light->speedZ 0;
            
    $light->$p->x;
            
    $light->$p->y;
            
    $light->$p->z;
            
    $p->dataPacket($light);
        }
      }
    }
    }
  10. Primus
    Offline

    Primus Notable Member

    Joined:
    Apr 7, 2015
    Posts:
    1,470
    Minecraft User:
    PrimusLV
    Lightning packet is from API 1.13+

    Use must use this code with PocketMine version higher than 1.5, e.g. any bleeding version.
  11. Jelly9912
    Offline

    Jelly9912 Active Member

    Joined:
    Aug 8, 2015
    Posts:
    118
    Minecraft User:
    Jelly9912
    install this and try /kill

    Attached Files:

  12. ItsSuka
    Offline

    ItsSuka Banned

    Joined:
    Nov 6, 2015
    Posts:
    13
    Minecraft User:
    Unknow
    it still not work :(
    just when I'm on my server the plugin is also not triggered the kill does not work.
  13. Jelly9912
    Offline

    Jelly9912 Active Member

    Joined:
    Aug 8, 2015
    Posts:
    118
    Minecraft User:
    Jelly9912
    Lol this is really weird, because everything works fine for me
  14. iDirtPlayzMC
    Offline

    iDirtPlayzMC Active Member

    Joined:
    Apr 10, 2015
    Posts:
    264
    Minecraft User:
    iZenith_xPr
    can u send packets to ll player so they can see
  15. Radguy23
    Offline

    Radguy23 Active Member

    Joined:
    Aug 14, 2015
    Posts:
    74
    Minecraft User:
    TheAwesomeCrew27
    command not working...
  16. Jelly9912
    Offline

    Jelly9912 Active Member

    Joined:
    Aug 8, 2015
    Posts:
    118
    Minecraft User:
    Jelly9912
    Follow https://github.com/Jelly9912/LightningJoin for coming updates, all bugs will be fixed soon
  17. ItsSuka
    Offline

    ItsSuka Banned

    Joined:
    Nov 6, 2015
    Posts:
    13
    Minecraft User:
    Unknow
  18. Gatucraft
    Offline

    Gatucraft Active Member

    Joined:
    Sep 24, 2015
    Posts:
    152
    Minecraft User:
    Rokito
    this is a great idea for VIP players! Have some perms ?
  19. xBeastMode
    Offline

    xBeastMode Active Member

    Joined:
    Nov 27, 2015
    Posts:
    292
    Dude... Wheres "if($sender instanceof Player){}?" The console is not a player and the server won't find the level of the console. xD

    To all users requesting a plugin for this, I will be making a "beast" one soon. ;)

Share This Page

Advertisement