menu
#4531201 file_put_contents(): failed to open stream: No such file or directory

Submitted by PocketMine-MP 3.15.1

General information

Version: 3.15.1
Git commit: 9f604842
Plugin involvement: Direct
Report date: 2020-09-16 03:56:43 +0000 UTC

System Information

PHP version: 7.3.22
Operating system: linux
System banner: Linux f56db5c2-cc30-448e-96f4-96f70affa43b 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64

Error information

Warning: the TradeNPC plugin was directly involved in this crash. Please contact the plugin author.
Message: file_put_contents(): failed to open stream: No such file or directory
File: plugins/TradeNPC.phar/src/TradeNPC/Main
Line: #276
Error level: ErrorException
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286

public function onQuit(PlayerQuitEvent $event)
{
$player = $event->getPlayer();
if (isset($this->deviceOSData[strtolower($player->getName())])) unset($this->deviceOSData[strtolower($player->getName())]);
}

public function saveData(TradeNPC $npc)
{
file_put_contents($this->getDataFolder() . $npc->getNameTag() . ".dat", $npc->getSaveNBT());
}

public function onDisable()
{
foreach ($this->getServer()->getLevels() as $level) {
foreach ($level->getEntities() as $entity) {
if ($entity instanceof TradeNPC) {
file_put_contents($this->getDataFolder() . $entity->getNameTag() . ".dat", $entity->getSaveNBT());
}
}
#0 (): pocketmine\utils\Utils::errorExceptionHandler(integer 2, string[111] file_put_contents(/home/container/plugin_data/TradeNPC/h.dat): failed to open st, string[66] phar:///home/container/plugins/TradeNPC.phar/src/TradeNPC/Main.php, integer 276, array[1])
#1 plugins/TradeNPC.phar/src/TradeNPC/Main(276): file_put_contents(string[42] /home/container/plugin_data/TradeNPC/h.dat, string[25] ...Offers...Recipes......)
#2 plugins/TradeNPC.phar/src/TradeNPC/TradeNPC(47): TradeNPC\Main->saveData(object TradeNPC\TradeNPC)
#3 src/pocketmine/level/format/io/region/Anvil(71): TradeNPC\TradeNPC->saveNBT()
#4 src/pocketmine/level/format/io/region/McRegion(409): pocketmine\level\format\io\region\Anvil->nbtSerialize(object pocketmine\level\format\Chunk)
#5 src/pocketmine/level/format/io/BaseLevelProvider(186): pocketmine\level\format\io\region\McRegion->writeChunk(object pocketmine\level\format\Chunk)
#6 src/pocketmine/level/Level(1185): pocketmine\level\format\io\BaseLevelProvider->saveChunk(object pocketmine\level\format\Chunk)
#7 src/pocketmine/level/Level(1169): pocketmine\level\Level->saveChunks()
#8 src/pocketmine/Server(2291): pocketmine\level\Level->save(boolean )
#9 src/pocketmine/Server(2421): pocketmine\Server->doAutoSave()
#10 src/pocketmine/Server(2154): pocketmine\Server->tick()
#11 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#12 src/pocketmine/Server(1588): pocketmine\Server->start()
#13 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
#14 src/pocketmine/PocketMine(304): pocketmine\server()
#15 (11): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies