EvolSoft / MSpawns

Multiple Spawn plugin for PocketMine-MP
MIT License
16 stars 25 forks source link

[2.2] 'force-spawn' throws error #25

Closed marchershey closed 4 years ago

marchershey commented 4 years ago

Versions:

Have setworldspawn and setspawn set and when I enable force-spawn it throws the following error:


05.01 15:24:22 [Server] Server thread/CRITICAL ErrorException: "Object of class pocketmine\level\Level could not be converted to string" (EXCEPTION) in "plugins/MSpawns_v2.2/src/MSpawns/MSpawns" at line 482
05.01 15:24:22 [Server] Server thread/DEBUG #0 (): pocketmine\utils\Utils::errorExceptionHandler(integer 4096, string[71] Object of class pocketmine\level\Level could not be converted to string, string[103] /pocketmine/plugins/MSpawns_v2.2/, integer 482, array[4])
05.01 15:24:22 [Server] Server thread/DEBUG #1 plugins/MSpawns_v2.2/src/MSpawns/MSpawns(482): str_replace(string[7] {WORLD}, object pocketmine\level\Level, string[28] No spawn found in this world)
05.01 15:24:22 [Server] Server thread/DEBUG #2 plugins/MSpawns_v2.2/src/MSpawns/EventListener(94): MSpawns\MSpawns->replaceVars(string[28] No spawn found in this world, array[3])
05.01 15:24:22 [Server] Server thread/DEBUG #3 src/pocketmine/plugin/MethodEventExecutor(38): MSpawns\EventListener->onPlayerJoin(object pocketmine\event\player\PlayerJoinEvent)
05.01 15:24:22 [Server] Server thread/DEBUG #4 src/pocketmine/plugin/RegisteredListener(98): pocketmine\plugin\MethodEventExecutor->execute(object MSpawns\EventListener, object pocketmine\event\player\PlayerJoinEvent)
05.01 15:24:22 [Server] Server thread/DEBUG #5 src/pocketmine/event/Event(95): pocketmine\plugin\RegisteredListener->callEvent(object pocketmine\event\player\PlayerJoinEvent)
05.01 15:24:22 [Server] Server thread/DEBUG #6 src/pocketmine/Player(1089): pocketmine\event\Event->call()
05.01 15:24:22 [Server] Server thread/DEBUG #7 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(318): pocketmine\Player->doFirstSpawn()
05.01 15:24:22 [Server] Server thread/DEBUG #8 src/pocketmine/network/mcpe/protocol/SetLocalPlayerAsInitializedPacket(45): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleSetLocalPlayerAsInitialized(object pocketmine\network\mcpe\protocol\SetLocalPlayerAsInitializedPacket)
05.01 15:24:22 [Server] Server thread/DEBUG #9 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(111): pocketmine\network\mcpe\protocol\SetLocalPlayerAsInitializedPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter)
05.01 15:24:22 [Server] Server thread/DEBUG #10 src/pocketmine/network/mcpe/protocol/BatchPacket(123): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object pocketmine\network\mcpe\protocol\SetLocalPlayerAsInitializedPacket)
05.01 15:24:22 [Server] Server thread/DEBUG #11 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(111): pocketmine\network\mcpe\protocol\BatchPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter)
05.01 15:24:22 [Server] Server thread/DEBUG #12 src/pocketmine/Player(3161): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket)
05.01 15:24:22 [Server] Server thread/DEBUG #13 src/pocketmine/network/mcpe/RakLibInterface(169): pocketmine\Player->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket)
05.01 15:24:22 [Server] Server thread/DEBUG #14 vendor/pocketmine/raklib/src/server/ServerHandler(99): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string[21] 204.210.231.116 63808, object raklib\protocol\EncapsulatedPacket, integer 0)
05.01 15:24:22 [Server] Server thread/DEBUG #15 src/pocketmine/network/mcpe/RakLibInterface(109): raklib\server\ServerHandler->handlePacket()
05.01 15:24:22 [Server] Server thread/DEBUG #16 src/pocketmine/network/mcpe/RakLibInterface(99): pocketmine\network\mcpe\RakLibInterface->process()
05.01 15:24:22 [Server] Server thread/DEBUG #17 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe\{closure}()
05.01 15:24:22 [Server] Server thread/DEBUG #18 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
05.01 15:24:22 [Server] Server thread/DEBUG #19 src/pocketmine/Server(2349): pocketmine\snooze\SleeperHandler->sleepUntil(double 1578255862.3092)
05.01 15:24:22 [Server] Server thread/DEBUG #20 src/pocketmine/Server(2203): pocketmine\Server->tickProcessor()
05.01 15:24:22 [Server] Server thread/DEBUG #21 src/pocketmine/Server(1785): pocketmine\Server->start()
05.01 15:24:22 [Server] Server thread/DEBUG #22 src/pocketmine/PocketMine(268): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[59] /pocketmine/, string[67] /pocketmine/plugins/)
05.01 15:24:22 [Server] Server thread/DEBUG #23 src/pocketmine/PocketMine(291): pocketmine\server()
05.01 15:24:22 [Server] Server thread/DEBUG #24 (1): require(string[115] phar:///pocketmine/jar/pocketmine)
05.01 15:24:22 [Server] Server thread/INFO [USER] left the game
05.01 15:24:22 [Disconnect] User [USER] has disconnected, reason: Internal server error
05.01 15:24:22 [Server] RakLibServer thread/NOTICE Blocked 204.210.231.116 for 5 seconds
marchershey commented 4 years ago

Fixed.

Script was deleting the plugins_data/MSpawns folder so when editing, I have updated plugin files.

All I did was copy over the following files from /plugin_data/MSpawns to /plugins/MSpawns_v2.2/resources