menu
#2825086 Undefined variable: getDisplayName

Submitted by PocketMine-MP 3.9.4

General information

Version: 3.9.4
Git commit: 1be6783c
Plugin involvement: Direct
Report date: 2019-09-11 16:19:55 +0000 UTC

System Information

PHP version: 7.3.8
Operating system: win
System banner: Windows NT DESKTOP-UJLCFM1 10.0 build 15063 (Windows 10) AMD64

Error information

Warning: the Test plugin was directly involved in this crash. Please contact the plugin author.
Message: Undefined variable: getDisplayName
File: plugins/test.phar/src/Test/Main
Line: #35
Error level: ErrorException
26
27
28
29
30
31
32
33
34
35
36
37
38
	  $this -> getServer() -> broadcastMessage(C::GREEN."Hello World!");
}

public function onAttack(EntityDamageEvent $event) {
$entity = $event -> getEntity();
if($event -> getCause()== 2) {
$entity -> setInvisible(true);
}
global $player;
$name = $player -> $getDisplayName();
$this -> getServer() -> broadcastMessage(C::GREEN."Hello World! $name");
}
}
#0 plugins/test.phar/src/Test/Main(35): pocketmine\utils\Utils::errorExceptionHandler(integer 8, string[34] Undefined variable: getDisplayName, string[71] phar://C:/Users/test/Documents/PMMP/plugins/test.phar/src/Test/Main.php, integer 35, array[3])
#1 src/pocketmine/plugin/MethodEventExecutor(38): Test\Main->onAttack(object pocketmine\event\entity\EntityDamageEvent)
#2 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(object Test\Main, object pocketmine\event\entity\EntityDamageEvent)
#3 src/pocketmine/event/Event(99): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\entity\EntityDamageEvent)
#4 src/pocketmine/entity/Entity(992): pocketmine\event\Event->call()
#5 src/pocketmine/entity/Living(574): pocketmine\entity\Entity->attack(object pocketmine\event\entity\EntityDamageEvent)
#6 plugins/PureEntitiesX.phar/src/revivalpmmp/pureentities/entity/BaseEntity(266): pocketmine\entity\Living->attack(object pocketmine\event\entity\EntityDamageEvent)
#7 src/pocketmine/entity/Living(410): revivalpmmp\pureentities\entity\BaseEntity->attack(object pocketmine\event\entity\EntityDamageEvent)
#8 src/pocketmine/entity/Entity(1545): pocketmine\entity\Living->fall(double 60.703999542236)
#9 plugins/PureEntitiesX.phar/src/revivalpmmp/pureentities/entity/BaseEntity(376): pocketmine\entity\Entity->updateFallState(double -0.296, boolean 1)
#10 plugins/PureEntitiesX.phar/src/revivalpmmp/pureentities/entity/WalkingEntity(169): revivalpmmp\pureentities\entity\BaseEntity->move(double 0, double -0.296, double 0.074217200325651)
#11 plugins/PureEntitiesX.phar/src/revivalpmmp/pureentities/entity/monster/WalkingMonster(183): revivalpmmp\pureentities\entity\WalkingEntity->updateMove(integer 1)
#12 plugins/PureEntitiesX.phar/src/revivalpmmp/pureentities/entity/monster/walking/Creeper(125): revivalpmmp\pureentities\entity\monster\WalkingMonster->onUpdate(integer 106)
#13 src/pocketmine/level/Level(853): revivalpmmp\pureentities\entity\monster\walking\Creeper->onUpdate(integer 106)
#14 src/pocketmine/level/Level(786): pocketmine\level\Level->actuallyDoTick(integer 106)
#15 src/pocketmine/Server(2445): pocketmine\level\Level->doTick(integer 106)
#16 src/pocketmine/Server(2576): pocketmine\Server->checkTickUpdates(integer 106, double 1568218795.8604)
#17 src/pocketmine/Server(2345): pocketmine\Server->tick()
#18 src/pocketmine/Server(2205): pocketmine\Server->tickProcessor()
#19 src/pocketmine/Server(1784): pocketmine\Server->start()
#20 src/pocketmine/PocketMine(275): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[29] C:\Users\test\Documents\PMMP\, string[37] C:\Users\test\Documents\PMMP\plugins\)
#21 src/pocketmine/PocketMine(299): pocketmine\server()
#22 (1): require(string[84] phar://C:/Users/test/Documents/PMMP/PocketMine-MP.phar/src/pocketmine/PocketMine)

Loaded Plugins

  • Show

Server Settings

  • Show