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

How to read the contents of the sign?

Comments in 'Plugin Development' started by abler98, Nov 24, 2014.

  1. abler98
    Offline

    abler98 New Member

    Joined:
    Nov 15, 2014
    Posts:
    26
    Minecraft User:
    abler98
    How to read the contents of the sign?
    xFlare likes this.
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    PHP:
    // imports
    use pocketmine\math\Vector3;
    use 
    pocketmine\tile\Sign;
    // code
    /** @var \pocketmine\level\Level $level */
    $sign $level->getTile(new Vector3($x$y$z));
    if(
    $sign instanceof Sign){
        list(
    $line1$line2$line3$line4) = $sign->getText();
    }
    EvolSoft and abler98 like this.
  3. abler98
    Offline

    abler98 New Member

    Joined:
    Nov 15, 2014
    Posts:
    26
    Minecraft User:
    abler98
    Thank you
    PEMapModder likes this.

Share This Page

Advertisement