menu
#10623821 Call to undefined method pocketmine\event\player\PlayerInteractEvent::getPosition()

Submitted by PocketMine-MP 5.13.0

General information

Version: 5.13.0
Git commit: f193a990
Plugin involvement: Direct
Report date: 2024-04-03 04:48:49 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 35 seconds

System Information

PHP version: 8.2.13
JIT status: Not available
Operating system: win
System banner: Windows NT JULIOM 10.0 build 19045 (Windows 10) AMD64

Error information

Warning: the MyPlot plugin was directly involved in this crash. Please contact the plugin author.
Thread: Main
Message: Call to undefined method pocketmine\event\player\PlayerInteractEvent::getPosition()
File: plugins/MyPlot-API4/src/MyPlot/EventListener
Line: #155
Type: Error
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
    public static function getBlockFromEvent(BlockEvent $event): ?Block {
if ($event->getBlock() !== null) {
return $event->getBlock();
} else {
return null;
}
}

private function onEventOnBlock(BlockPlaceEvent|SignChangeEvent|PlayerInteractEvent|BlockBreakEvent $event) : void {
$levelName = $event->getPosition()->getWorld()?->getFolderName();
if(!$levelName or !$this->plugin->isLevelLoaded($levelName)) {
return;
}
$plot = $this->plugin->getPlotByPosition($event->getBlock()->getPosition());
if($plot !== null) {
$ev = new MyPlotBlockEvent($plot, $event->getBlock(), $event->getPlayer(), $event);
if($event->isCancelled()) {
$ev->cancel();
}
$ev->call();
#0 plugins/MyPlot-API4/src/MyPlot/EventListener(127): MyPlot\EventListener->onEventOnBlock(object pocketmine\event\player\PlayerInteractEvent#100211)
#1 pmsrc/src/event/RegisteredListener(61): MyPlot\EventListener->onPlayerInteract(object pocketmine\event\player\PlayerInteractEvent#100211)
#2 pmsrc/src/event/Event(63): pocketmine\event\RegisteredListener->callEvent(object pocketmine\event\player\PlayerInteractEvent#100211)
#3 pmsrc/src/player/Player(1746): pocketmine\event\Event->call()
#4 pmsrc/src/network/mcpe/handler/InGamePacketHandler(684): pocketmine\player\Player->attackBlock(object pocketmine\math\Vector3#100209, int 2)
#5 pmsrc/src/network/mcpe/handler/InGamePacketHandler(259): pocketmine\network\mcpe\handler\InGamePacketHandler->handlePlayerActionFromData(int 0, object pocketmine\network\mcpe\protocol\types\BlockPosition#194233, int 2)
#6 pmsrc/vendor/pocketmine/bedrock-protocol/src/PlayerAuthInputPacket(296): pocketmine\network\mcpe\handler\InGamePacketHandler->handlePlayerAuthInput(object pocketmine\network\mcpe\protocol\PlayerAuthInputPacket#97211)
#7 pmsrc/src/network/mcpe/NetworkSession(456): pocketmine\network\mcpe\protocol\PlayerAuthInputPacket->handle(object pocketmine\network\mcpe\handler\InGamePacketHandler#117537)
#8 pmsrc/src/network/mcpe/NetworkSession(394): pocketmine\network\mcpe\NetworkSession->handleDataPacket(object pocketmine\network\mcpe\protocol\PlayerAuthInputPacket#97211, string[129] ....-B..l...d.r)\B...>..........l............................6..................)
#9 pmsrc/src/network/mcpe/raklib/RakLibInterface(214): pocketmine\network\mcpe\NetworkSession->handleEncoded(string[89] .c.abdF.....gL.ub..9p.L..".....3..`.(.........0.D$g....c.5cba.c.2..g...a.j...1..)
#10 pmsrc/vendor/pocketmine/raklib-ipc/src/RakLibToUserThreadMessageReceiver(40): pocketmine\network\mcpe\raklib\RakLibInterface->onPacketReceive(int 0, string[98] .#........$.5/..?.O.?/.Y2Nd.p'a.8.../g........G.|o.y..z./.....><4Z....;..BJ.Z...)
#11 pmsrc/src/network/mcpe/raklib/RakLibInterface(107): raklib\server\ipc\RakLibToUserThreadMessageReceiver->handle(object pocketmine\network\mcpe\raklib\RakLibInterface#188445)
#12 pmsrc/src/TimeTrackingSleeperHandler(58): pocketmine\network\mcpe\raklib\RakLibInterface->pocketmine\network\mcpe\raklib\{closure}()
#13 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(120): pocketmine\TimeTrackingSleeperHandler->pocketmine\{closure}()
#14 pmsrc/src/TimeTrackingSleeperHandler(77): pocketmine\snooze\SleeperHandler->processNotifications()
#15 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(79): pocketmine\TimeTrackingSleeperHandler->processNotifications()
#16 pmsrc/src/Server(1696): pocketmine\snooze\SleeperHandler->sleepUntil(float 1712119729.3558)
#17 pmsrc/src/Server(1066): pocketmine\Server->tickProcessor()
#18 pmsrc/src/PocketMine(350): pocketmine\Server->__construct(object pocketmine\thread\ThreadSafeClassLoader#6, object pocketmine\utils\MainLogger#3, string[43] C:\Users\DELL\Desktop\PocketMine-MP-stable\, string[51] C:\Users\DELL\Desktop\PocketMine-MP-stable\plugins\)
#19 pmsrc/src/PocketMine(373): pocketmine\server()
#20 pmsrc(11): require(string[87] phar://C:/Users/DELL/Desktop/PocketMine-MP-stable/PocketMine-MP.phar/src/PocketM)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies

Installed PHP Extensions

  • Show