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

Block Update?

Comments in 'Plugin Development' started by Sensej, Aug 22, 2014.

  1. Sensej
    Offline

    Sensej New Member

    Joined:
    Aug 5, 2014
    Posts:
    64
    Hello Devs,
    I want to place a block with this code
    server::getInstance()->getLevelbyName($mapname)->setBlockIdAt(79, 27, 826, 56);
    but if i was try this code but the block was invisible.
    Can somebody help?

    -Sensej
  2. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    You should use setBlock(new Vector3($x, $y, $z), Block::get($id, $damage));.
    iJoshuaHD and Tuff like this.
  3. Sensej
    Offline

    Sensej New Member

    Joined:
    Aug 5, 2014
    Posts:
    64
    I become this error
    [ERROR] An E_ERROR error happened: "Autoloader couldn't find a file to include for pocketmine\block" in "/src/spl/SplClassLoader" at line 156

    but i already include pocketmine\block
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Because the class is pocketmine\block\Block ;)

Share This Page

Advertisement