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

Setting blocks error help

Comments in 'Plugin Development' started by BalAnce, Mar 15, 2015.

  1. BalAnce
    Offline

    BalAnce Active Member

    Joined:
    Mar 10, 2015
    Posts:
    125
    Minecraft User:
    BalAnce
    Currently trying to set a block using the following code:
    Code:
    $sender->sendMessage("Making Blocks! :D");
     $x = $sender->x;
     $y = $sender->z - 1;
    $z = $sender->z;
    $pos = new Vector3($x, $y, $z);
     $block = 5;
    $level = $sender->getLevel();
    $level->setBlock($pos, $block);
    currently getting this error:
    Code:
    [CRITICAL] Unhandled exception executing command 'blocks' in Blocks: Class FirstPlugin\Vector3 not found
    20:43:13 [CRITICAL] ClassNotFoundException: "Class FirstPlugin\Vector3 not found" (EXCEPTION) in "/src/spl/BaseClassLoader" at line 122
    Thanks in advance! :D
  2. BalAnce
    Offline

    BalAnce Active Member

    Joined:
    Mar 10, 2015
    Posts:
    125
    Minecraft User:
    BalAnce
    bump
  3. ButterCoder
    Offline

    ButterCoder New Member

    Joined:
    Jun 18, 2015
    Posts:
    8
    Minecraft User:
    ButterCoder
    I think the "$y = $sender->Z - 1;" needs to be this
    " $y = $sender->y - 1; "

Share This Page

Advertisement