1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Plugin help

Discussion in 'Facepalm' started by Martti16, Aug 12, 2017.

  1. Martti16

    Martti16 Spider

    Messages:
    14
    GitHub:
    Marttinek
    Why does not work? How to generate a chest on random coordinates? How to add items to this chest?

    if($cmd->getName() == "event"){
    if($sender->hasPermission("event.event")){
    $x = rand(1,100);
    $y = rand(80,100);
    $z = rand(1,100);
    $sender->getLevel()->setBlock(new Vector3($x, $y, $z), Block::get(54, 0));
    $sender->getServer()->broadcastMessage("§f• §8[§cEvent§8]§7 Skrzynka z cennymi itemami została wygenerowana na: X: $x Y: $y Z: $z §f•");
    }
    else{
    $sender->sendMessage("§f• §8[§cEvent§8]§7 Ta komenda jest tylko dla administracji! §f•");
    }
    }
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.