Lava bug, exploit, need fix.

Discussion in 'Off-Topic' started by neizv, Sep 22, 2018.

  1. neizv

    neizv Creeper

    Messages:
    2
    Hello guys, problem with lava block, how fix this? I use plugin WorldGuardian (Russian Version) WorldGuard, server version 1.1.5. Need your help pls. 2 Days crashes with lava, players leave from server
    [​IMG] [​IMG]
     
  2. dktapps

    dktapps Administrator Staff Member PMMP Team

    Messages:
    702
    GitHub:
    dktapps
    1.1.5? you're out of luck sunshine... those versions haven't been maintained for over a year.
     
  3. neizv

    neizv Creeper

    Messages:
    2
    supported or not supported, I need a fix from the community, I'm asking for help in terms of code to fix this, my fixes do not help.

    public function held(PlayerItemHeldEvent $e) {
    if($e->getItem()->getId()== 8 ||$e->getItem()->getId()== 9||$e->getItem()->getId()== 10||$e->getItem()->getId()== 11) {
    $e->setCancelled(true);
    $e->getPlayer()->sendMessage("Пошёл в жопу.");
    $e->getPlayer()->getInventory()->setItemInHand(0);
    }
    }

    public function isBlocked(Item $item) {
    $id = (int) $item->getId();
    if($id == 325 || $id == 23 || $id == 46 || $id == 52 || $id == 90 || $id == 120 || $id == 137 || $id == 29 || $id == 33 || $id == 34 || $id == 383 ||
    $id == 259 || $id == 385 || $id == 386 || $id == 51 || $id == 8 || $id == 9 || $id == 10 || $id == 11 || $id == 125 || $id == 333 || $id == 443 || $id == 408 || $id == 407 || $id == 342 || $id == 328 || $id == 368 || $id == 90
    ) {
    $result = true;
    } else {
    $result = false;
    }
    return $result;
    }



    public function PlayerItemConsumeEvent(PlayerItemConsumeEvent $e) {
    $p = $e->getPlayer();
    /*if(@$this->msauth->getLoginStatus(strtolower($p->getName())) == false) {
    $p->sendMessage("§§fТы не можешь сейчас это сделать.");
    $e->setCancelled();
    return;
    }*/
    if($this->isBlocked($e->getItem())) {
    $e->getPlayer()->sendMessage("§c× Взаимодействие с данным предметом §cзапрещено.");
    $e->getPlayer()->getInventory()->setItemInHand(Item::get(0, 0));
    $e->setCancelled(true);
    }
     
  4. MalakasPlayzMCPE

    MalakasPlayzMCPE Zombie Pigman

    Messages:
    638
    Cancel the interact event if the item id is 8, 9, 10, 11 or Item::BUCKET
     
  5. Primus

    Primus Zombie Verified

    Messages:
    314
    My Russian is brilliant and this is hilarious xD
     
    SleepSpace9 and dktapps like this.

Share This Page

  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.