menu
#3078598 Call to undefined method pocketmine\event\entity\EntityDamageEvent::getDamager()

Submitted by PocketMine-MP 3.8.7

General information

Version: 3.8.7
Git commit: 790fcc4e
Plugin involvement: Direct
Report date: 2019-11-08 00:30:31 +0000 UTC

System Information

PHP version: 7.3.11
Operating system: win
System banner: Windows NT 172_21_0_17 10.0 build 14393 (Windows Server 2016) AMD64

Error information

Warning: the RexMobsKillMoney plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method pocketmine\event\entity\EntityDamageEvent::getDamager()
File: plugins/RexMobsKillMoney_v1.0.2.phar/src/RexMobsKillMoney/RexMobsKillMoney
Line: #39
Error level: Error
30
31
32
33
34
35
36
37
38
39
40
41
42
43
		$this->getLogger()->info(TextFormat::DARK_GREEN . "RexMobsKillMoney enable!");
}

public function onDisable(){
$this->getLogger()->info(TextFormat::DARK_RED . "RexMobsKillMoney disable!");
}

public function onEntityDamage(EntityDamageEvent $event){
$entity = $event->getEntity();
$damager = $event->getDamager();
EconomyAPI::getInstance()->addMoney($damager,30);
$damager->getPlayer()->sendMessage("[ RexMobsKillMoney ]你殺死了Mob 獲得30元");
}
}
#0 src/pocketmine/plugin/MethodEventExecutor(38): RexMobsKillMoney\RexMobsKillMoney->onEntityDamage(object pocketmine\event\entity\EntityDamageEvent)
#1 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(object RexMobsKillMoney\RexMobsKillMoney, object pocketmine\event\entity\EntityDamageEvent)
#2 src/pocketmine/event/Event(99): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\entity\EntityDamageEvent)
#3 src/pocketmine/entity/Entity(986): pocketmine\event\Event->call()
#4 src/pocketmine/entity/Living(574): pocketmine\entity\Entity->attack(object pocketmine\event\entity\EntityDamageEvent)
#5 src/pocketmine/Player(3722): pocketmine\entity\Living->attack(object pocketmine\event\entity\EntityDamageEvent)
#6 src/pocketmine/entity/Living(410): pocketmine\Player->attack(object pocketmine\event\entity\EntityDamageEvent)
#7 src/pocketmine/Player(1691): pocketmine\entity\Living->fall(double 3.1604)
#8 src/pocketmine/entity/Entity(1539): pocketmine\Player->fall(double 3.1604)
#9 src/pocketmine/entity/Entity(1752): pocketmine\entity\Entity->updateFallState(double -0.70299999999999, boolean 1)
#10 src/pocketmine/Player(1612): pocketmine\entity\Entity->move(double -0.1661, double -0.70299999999999, double 0.12010000000004)
#11 src/pocketmine/Player(1755): pocketmine\Player->processMovement(integer 1)
#12 src/pocketmine/level/Level(848): pocketmine\Player->onUpdate(integer 1140)
#13 src/pocketmine/level/Level(786): pocketmine\level\Level->actuallyDoTick(integer 1140)
#14 src/pocketmine/Server(2445): pocketmine\level\Level->doTick(integer 1140)
#15 src/pocketmine/Server(2576): pocketmine\Server->checkTickUpdates(integer 1140, double 1573173031.0758)
#16 src/pocketmine/Server(2345): pocketmine\Server->tick()
#17 src/pocketmine/Server(2205): pocketmine\Server->tickProcessor()
#18 src/pocketmine/Server(1784): pocketmine\Server->start()
#19 src/pocketmine/PocketMine(274): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[50] C:\Users\Administrator\Desktop\......... - ......\, string[58] C:\Users\Administrator\Desktop\......... - ......\plugins\)
#20 (1): require(string[105] phar://C:/Users/Administrator/Desktop/......... - ....../PocketMine-MP.phar/src/)

Loaded Plugins

  • Show

Server Settings

  • Show