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

Info Text

Comments in 'Plugin Development' started by Jon, May 15, 2015.

  1. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    Hi guys, i was watching the official docs and i had also a conversation with a PM developer that has more experience than me but he has no idea of how to do what i am going to ask you.

    Before explain Everything what here:


    Screenshot_2015-05-14-11-57-48.png

    OK, i am talking about this, that i call " info text ".
    I am wondering about how to make it.

    Anybody know it? I think so, i hope so, thanks
    EvolSoft and HotFireyDeath like this.
  2. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    PHP:
    $level->addParticle(new FloatingTextParticle(new Vector3($x$y$z), "Text"));
  3. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    Is that for 0.11.0?
  4. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Yes
    Jon likes this.
  5. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    Really?!
    The answer is FloatingTextParticle?!
    Falk likes this.
  6. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Yea why?
  7. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    Nothing, thanks a lot
  8. CraftYourBukkit
    Offline

    CraftYourBukkit Notable Member Plugin Developer

    Joined:
    Jan 20, 2015
    Posts:
    1,022
    Plugins:
    2
    Minecraft User:
    CraftYourBukkit
    Lol, okay xD Leave a like?:)
  9. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    Happy now? :D
  10. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    We are happy when someone finds out an answer he was looking for.
  11. xiaoq
    Offline

    xiaoq Active Member

    Joined:
    Dec 23, 2014
    Posts:
    232
    Minecraft User:
    xiaoq
    And this is code form Mentha Haplocalyx @Alcatraz_Du
    PHP:
    public function onPlayerJoin(PlayerJoinEvent $ev){
    $p $ev->getPlayer();
     
    $ids$this->tag["id"];
     
    $n count($ids);
    for(
    $id 0;$id $n$id++){
       
    $idinfo $this->tag[$ids[$id]];
      
    $this->onTag($p,$idinfo,$ids[$id]);
    }
    }
    public function 
    onTag(Player $p,$info,$eid){
     
    $pk = new AddPlayerPacket();
     
    $pk->eid $eid;
     
    $pk->username $info["message"];
     
    $pk->$info["x"];
     
    $pk->$info["y"];
     
    $pk->$info["z"];
     
    $pk->skin = \str_repeat("\x00"64 32 4);
     
    $pk->metadata = [
                    
    Entity::DATA_FLAGS => [Entity::DATA_TYPE_BYTE<< Entity::DATA_FLAG_INVISIBLE],
                    
    Entity::DATA_AIR => [Entity::DATA_TYPE_SHORT300],
                    
    Entity::DATA_SHOW_NAMETAG => [Entity::DATA_TYPE_BYTE1],
                    
    Entity::DATA_NO_AI => [Entity::DATA_TYPE_BYTE1]
                ];
     
    $p->dataPacket($pk);
    }

  12. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    API 1.12.0 provides better ways to do it (FloatingTextParticle).
    iJoshuaHD likes this.
  13. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    For example?
  14. PixelGuy75
    Offline

    PixelGuy75 Notable Member Plugin Developer

    Joined:
    Feb 9, 2014
    Posts:
    316
    Plugins:
    2
    Minecraft User:
    PixelGuy75
    As @CraftYourBukkit said above:
    PEMapModder likes this.
  15. Jon
    Offline

    Jon Active Member Plugin Developer

    Joined:
    Sep 1, 2013
    Posts:
    201
    Plugins:
    3
    Minecraft User:
    Heromine14
    PEMapModder likes this.

Share This Page

Advertisement