menu
#2581268 Call to undefined method pocketmine\event\entity\EntityDamageByChildEntityEvent::setDamage()

Submitted by PocketMine-MP 3.8.2

General information

Version: 3.8.2
Git commit: 5c81da9b
Plugin involvement: Direct
Report date: 2019-07-11 22:31:38 +0000 UTC

System Information

PHP version: 7.2.16
Operating system: win
System banner: Windows NT DESKTOP-NPO10HF 10.0 build 17134 (Windows 10) AMD64

Error information

Warning: the LuckyBlock plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method pocketmine\event\entity\EntityDamageByChildEntityEvent::setDamage()
File: plugins/LuckyBlock/src/NawafPlugin/LuckyBlock
Line: #190
Error level: Error
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
            if($event->getCause() === EntityDamageEvent::CAUSE_ENTITY_EXPLOSION){

if(in_array($player->getName(), $this->player)){
$event->setDamage(6);
}
}
if($event->getCause() === 2){

if(in_array($player->getName(), $this->player)){
$event->setDamage(2);
}
}
}
if ($event instanceof \pocketmine\event\entity\EntityDamageByEntityEvent) {
if ($event->getEntity() instanceof \pocketmine\Player && $event->getDamager() instanceof \pocketmine\Player) {
if(in_array($event->getEntity()->getName(), $this->player)){
if($event->getDamager()->getInventory()->getItemInHand()->getId() == 293){
$event->setDamage(8);
$p = $event->getEntity();
$light = new \pocketmine\network\protocol\AddEntityPacket();
#0 src/pocketmine/plugin/MethodEventExecutor(38): NawafPlugin\LuckyBlock->onPlayerHurt(pocketmine\event\entity\EntityDamageByChildEntityEvent object)
#1 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(NawafPlugin\LuckyBlock object, pocketmine\event\entity\EntityDamageByChildEntityEvent object)
#2 src/pocketmine/event/Event(99): pocketmine\plugin\RegisteredListener->callEvent(pocketmine\event\entity\EntityDamageByChildEntityEvent object)
#3 src/pocketmine/entity/Entity(984): pocketmine\event\Event->call()
#4 src/pocketmine/entity/Living(572): pocketmine\entity\Entity->attack(pocketmine\event\entity\EntityDamageByChildEntityEvent object)
#5 src/pocketmine/Player(3719): pocketmine\entity\Living->attack(pocketmine\event\entity\EntityDamageByChildEntityEvent object)
#6 src/pocketmine/entity/projectile/Projectile(318): pocketmine\Player->attack(pocketmine\event\entity\EntityDamageByChildEntityEvent object)
#7 src/pocketmine/entity/projectile/Projectile(252): pocketmine\entity\projectile\Projectile->onHitEntity(pocketmine\Player object, pocketmine\math\RayTraceResult object)
#8 src/pocketmine/entity/Entity(1464): pocketmine\entity\projectile\Projectile->move(double 0, double -1.361386212811, double 0)
#9 plugins/LuckyBlock/src/NawafPlugin/LuckyBlock(428): pocketmine\entity\Entity->onUpdate(integer 5510)
#10 src/pocketmine/level/Level(848): NawafPlugin\FireBall->onUpdate(integer 5510)
#11 src/pocketmine/level/Level(786): pocketmine\level\Level->actuallyDoTick(integer 5510)
#12 src/pocketmine/Server(2434): pocketmine\level\Level->doTick(integer 5510)
#13 src/pocketmine/Server(2565): pocketmine\Server->checkTickUpdates(integer 5510, double 1562884298.422)
#14 src/pocketmine/Server(2334): pocketmine\Server->tick()
#15 src/pocketmine/Server(2195): pocketmine\Server->tickProcessor()
#16 src/pocketmine/Server(1774): pocketmine\Server->start()
#17 src/pocketmine/PocketMine(266): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string C:\Users\Dell\Desktop\PocketMine-MP\, string C:\Users\Dell\Desktop\PocketMine-MP\plugins\)
#18 (1): require(string phar://C:/Users/Dell/Desktop/PocketMine-MP/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show