menu
#2467497 Call to a member function getFolderName() on null

Submitted by PocketMine-MP 3.8.1

General information

Version: 3.8.1
Git commit: 7521160f
Plugin involvement: Direct
Report date: 2019-06-12 03:58:26 +0000 UTC

System Information

PHP version: 7.2.9
Operating system: linux
System banner: Linux ubuntu 4.4.0-146-generic #172-Ubuntu SMP Wed Apr 3 09:00:08 UTC 2019 x86_64

Error information

Warning: the Worlds plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function getFolderName() on null
File: plugins/Worlds.phar/src/surva/worlds/EventListener
Line: #201
Error level: Error
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
            }
}
}

/**
* @param PlayerExhaustEvent $event
*/
public function onPlayerExhaust(PlayerExhaustEvent $event): void {
$player = $event->getPlayer();
$foldername = $player->getLevel()->getFolderName();

if($world = $this->getWorlds()->getWorldByName($foldername)) {
if($world->getHunger() === false) {
$event->setCancelled();
}
}
}

/**
* @param PlayerInteractEvent $event
#0 src/pocketmine/plugin/MethodEventExecutor(38): surva\worlds\EventListener->onPlayerExhaust(pocketmine\event\player\PlayerExhaustEvent object)
#1 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(surva\worlds\EventListener object, pocketmine\event\player\PlayerExhaustEvent object)
#2 src/pocketmine/event/Event(99): pocketmine\plugin\RegisteredListener->callEvent(pocketmine\event\player\PlayerExhaustEvent object)
#3 src/pocketmine/entity/Human(278): pocketmine\event\Event->call()
#4 src/pocketmine/entity/Human(178): pocketmine\entity\Human->exhaust(double 0.2, integer 9)
#5 plugins/Bot.phar/src/Bot/tasks/JumpTask(31): pocketmine\entity\Human->jump()
#6 src/pocketmine/scheduler/TaskHandler(159): Bot\tasks\JumpTask->onRun(integer 878844)
#7 src/pocketmine/scheduler/TaskScheduler(199): pocketmine\scheduler\TaskHandler->run(integer 878844)
#8 src/pocketmine/plugin/PluginManager(688): pocketmine\scheduler\TaskScheduler->mainThreadHeartbeat(integer 878844)
#9 src/pocketmine/Server(2559): pocketmine\plugin\PluginManager->tickSchedulers(integer 878844)
#10 src/pocketmine/Server(2335): pocketmine\Server->tick()
#11 src/pocketmine/Server(2196): pocketmine\Server->tickProcessor()
#12 src/pocketmine/Server(1775): pocketmine\Server->start()
#13 src/pocketmine/PocketMine(258): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /home/mc_19765/16194/, string /home/mc_19765/16194/plugins/)
#14 (1): require(string phar:///usr/share/shareport/exec/mcpe/PocketMine-MP-111.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show