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

ServerLoveMCPE Hearts Particle

Comments in 'Plugin Development' started by TheDeibo, Jan 25, 2016.

  1. TheDeibo
    Offline

    TheDeibo Notable Member Plugin Developer

    Joined:
    Sep 8, 2014
    Posts:
    692
    Plugins:
    1
    Minecraft User:
    TheDeibo
    I want to add a "mob in love" particle on to my plugin.
    PHP:
                            }else{
                                
    $lovedPlayer->sendMessage("§5[<3]§a" $sender->getName() . "§5is in love with you!");
                                if(isset(
    $args[0])){
                                    
    $lovedPlayer->sendMessage("Reason: " implode(" "$args));
                                }
                                
    $sender->sendMessage("§5[<3] So you love §a" $loved "?§5 Awww, thats nice");
                                
    $this->getServer()->broadcastMessage("§a" $sender->getName() . " §dis in love with §a" $loved "§d.");
                                
    $this->getServer()->broadcastMessage("§d♥" $loved "§d ♥ " $sender->getName() . "§d♥");
    /** INSERT HEARTS PARTICLE HERE **/
    Does anyone know how to do it?
  2. TheDeibo
    Offline

    TheDeibo Notable Member Plugin Developer

    Joined:
    Sep 8, 2014
    Posts:
    692
    Plugins:
    1
    Minecraft User:
    TheDeibo
    The whole code is on my github
  3. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    $lovedPlayer->getLevel()->addParticle(new \pocketmine\level\particle\HeartParticle($lovedPlayer));
    TheDeibo likes this.
  4. TheDeibo
    Offline

    TheDeibo Notable Member Plugin Developer

    Joined:
    Sep 8, 2014
    Posts:
    692
    Plugins:
    1
    Minecraft User:
    TheDeibo
    would that give me a couplemof hearts, or the hearts when a mob is in love?
  5. PocketKiller
    Offline

    PocketKiller Notable Member

    Joined:
    Jul 20, 2015
    Posts:
    741
    On the place you will put, the hearts will be on the player's leg
    TheDeibo likes this.

Share This Page

Advertisement