BlockHorizons / PerWorldInventory

A full-featured per world inventory plugin for PocketMine-MP.
https://poggit.pmmp.io/p/perworldinventory
Apache License 2.0
14 stars 10 forks source link

Error when user leaves the server. #18

Closed ZandercraftGames closed 3 years ago

ZandercraftGames commented 5 years ago

Hey. I get this error whenever I leave the server.

[21:50:23] [Server thread/INFO]: [Staff] <Staff> ZandercraftYT disconnected from the server.
[21:50:23] [Server thread/INFO]: [21:50:23] ZandercraftYT has left the game
[21:50:23] [Asynchronous Worker #0 thread/CRITICAL]: ErrorException: "file_put_contents(C:\Users\Zander Maitland\Desktop\Pocketmine\plugin_data\PerWorldInventory/inventories/zandercraftyt.dat): failed to open stream: No such file or directory" (EXCEPTION) in "src/pocketmine/scheduler/FileWriteTask" at line 47
[21:50:23] [Asynchronous Worker #0 thread/DEBUG]: #0 (): pocketmine\utils\Utils::errorExceptionHandler(integer 2, string file_put_contents(C:\Users\Zander Maitland\Desktop\Pocketmine\plugin_data\PerWorldInventory/inventories/zandercraftyt.dat): failed to open stream: No such file or directory, string phar://C:/Users/Zander Maitland/Desktop/Pocketmine/PocketMine-MP.phar/src/pocketmine/scheduler/FileWriteTask.php, integer 47, array Array())
[21:50:23] [Asynchronous Worker #0 thread/DEBUG]: #1 src/pocketmine/scheduler/FileWriteTask(47): file_put_contents(string C:\Users\Zander Maitland\Desktop\Pocketmine\plugin_data\PerWorldInventory/inventories/zandercraftyt.dat, string ...........b`.d....t..O..b```fb`.La0bd`u./.+.ab`sI.MLOe``d`.../a`..a....T..Q.(.S..P.....h7ky~QN..-f....%b...., integer 0)
[21:50:23] [Asynchronous Worker #0 thread/DEBUG]: #2 src/pocketmine/scheduler/AsyncTask(72): pocketmine\scheduler\FileWriteTask->onRun()
[21:50:23] [Asynchronous Worker #0 thread/DEBUG]: #3 (): pocketmine\scheduler\AsyncTask->run()
[21:50:23] [Server thread/INFO]: ZandercraftYT[/192.168.2.165:63450] logged out due to Internal server error
[21:50:23] [Server thread/CRITICAL]: Could not execute asynchronous task FileWriteTask: Task crashed
[21:50:23] [RakLibServer thread/NOTICE]: Blocked 192.168.2.165 for 5 seconds
ZandercraftGames commented 5 years ago

I checked and there is no such file in that directory.

ZandercraftGames commented 5 years ago

Here is my config:

---
# Configuration file for PerWorldInventory by BlockHorizons

# Worlds in which inventories should be bundled. This means, that MyWorld will have the same inventory as MySecondWorld.
#
# This may get tricky if you have circular dependencies, here's an example of what the plugin does in
# case of circular dependencies.
#
# Example:
# Bundled-Worlds:
#   MainWorld:
#     - world1
#     - world2
#   world2:
#     - world3
#     - world4
#
# The plugin will merge world2's worlds into MainWorld, it will look something like this:
# Bundled-Worlds:
#   MainWorld:
#     - world1
#     - world2
#     - world3
#     - world4
#
Bundled-Worlds:
  world:
    - crates
    - pvp
    - roleplay1
...
ZandercraftGames commented 5 years ago

Also, if it is of any interest; the per-world inventory isn't working for me. It doesn't do anything to my inventory.

Reflyansyah commented 5 years ago

Oke ! This Solution

  1. Make dir inventories in PluginData/PerWorldInventory
  2. Reboot The Server
  3. Done
ZandercraftGames commented 5 years ago

@aeternianetwork That directory already exists.

lukeeey commented 3 years ago

Please download the latest release.