Muqsit / Wilderness

A PocketMine-MP plugin that teleports players into the wilderness!
https://poggit.pmmp.io/p/Wilderness
GNU General Public License v3.0
11 stars 5 forks source link

SpecificWorldSelector: Send error message instead of throwing exception when attempting to teleport to an unloaded world #7

Open jaylac2000 opened 4 years ago

jaylac2000 commented 4 years ago

if running /wild for specific world

[00:58:51] [Server thread/CRITICAL]: InvalidArgumentException: "Cannot teleport player to unloaded world facworld" (EXCEPTION) in "plugins/Wilderness.phar/src/muqsit/wilderness/behaviour/defaults/SpecificWorldSelector" at line 32 [00:58:51] [Server thread/CRITICAL]: #0 plugins/Wilderness.phar/src/muqsit/wilderness/behaviour/DefaultWildernessBehaviour(48): muqsit\wilderness\behaviour\defaults\SpecificWorldSelector->select(object kielking\ApolloMCPECore\SubPlugins\NameSpaceRemover\CustomPlayer) [00:58:51] [Server thread/CRITICAL]: #1 plugins/Wilderness.phar/src/muqsit/wilderness/command/BehaviourCommandExecutor(90): muqsit\wilderness\behaviour\DefaultWildernessBehaviour->generatePosition(object kielking\ApolloMCPECore\SubPlugins\NameSpaceRemover\CustomPlayer, object Closure) [00:58:51] [Server thread/CRITICAL]: #2 src/pocketmine/command/PluginCommand(54): muqsit\wilderness\command\BehaviourCommandExecutor->onCommand(object kielking\ApolloMCPECore\SubPlugins\NameSpaceRemover\CustomPlayer, object pocketmine\command\PluginCommand, string[4] wild, array[0]) [00:58:51] [Server thread/CRITICAL]: #3 src/pocketmine/command/SimpleCommandMap(248): pocketmine\command\PluginCommand->execute(object kielking\ApolloMCPECore\SubPlugins\NameSpaceRemover\CustomPlayer, string[4] wild, array[0]) [00:58:51] [Server thread/CRITICAL]: #4 src/pocketmine/Server(1811): pocketmine\command\SimpleCommandMap->dispatch(object kielking\ApolloMCPECore\SubPlugins\NameSpaceRemover\CustomPlayer, string[4] wild) [00:58:51] [Server thread/CRITICAL]: #5 src/pocketmine/Player(2310): pocketmine\Server->dispatchCommand(object kielking\ApolloMCPECore\SubPlugins\NameSpaceRemover\CustomPlayer, string[4] wild) [00:58:51] [Server thread/CRITICAL]: #6 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(244): pocketmine\Player->chat(string[5] /wild) [00:58:51] [Server thread/CRITICAL]: #7 src/pocketmine/network/mcpe/protocol/CommandRequestPacket(54): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleCommandRequest(object pocketmine\network\mcpe\protocol\CommandRequestPacket) [00:58:51] [Server thread/CRITICAL]: #8 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(110): pocketmine\network\mcpe\protocol\CommandRequestPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter) [00:58:51] [Server thread/CRITICAL]: #9 src/pocketmine/network/mcpe/protocol/BatchPacket(127): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object pocketmine\network\mcpe\protocol\CommandRequestPacket) [00:58:51] [Server thread/CRITICAL]: #10 src/pocketmine/network/mcpe/PlayerNetworkSessionAdapter(110): pocketmine\network\mcpe\protocol\BatchPacket->handle(object pocketmine\network\mcpe\PlayerNetworkSessionAdapter) [00:58:51] [Server thread/CRITICAL]: #11 src/pocketmine/Player(3247): pocketmine\network\mcpe\PlayerNetworkSessionAdapter->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket) [00:58:51] [Server thread/CRITICAL]: #12 src/pocketmine/network/mcpe/RakLibInterface(169): pocketmine\Player->handleDataPacket(object pocketmine\network\mcpe\protocol\BatchPacket) [00:58:51] [Server thread/CRITICAL]: #13 vendor/pocketmine/raklib/src/server/ServerHandler(99): pocketmine\network\mcpe\RakLibInterface->handleEncapsulated(string[21] 174.112.105.100 54992, object raklib\protocol\EncapsulatedPacket, integer 0) [00:58:51] [Server thread/CRITICAL]: #14 src/pocketmine/network/mcpe/RakLibInterface(109): raklib\server\ServerHandler->handlePacket() [00:58:51] [Server thread/CRITICAL]: #15 src/pocketmine/network/mcpe/RakLibInterface(99): pocketmine\network\mcpe\RakLibInterface->process() [00:58:51] [Server thread/CRITICAL]: #16 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\network\mcpe\RakLibInterface->pocketmine\network\mcpe{closure}() [00:58:51] [Server thread/CRITICAL]: #17 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications() [00:58:51] [Server thread/CRITICAL]: #18 src/pocketmine/Server(2157): pocketmine\snooze\SleeperHandler->sleepUntil(double 1597021131.0239) [00:58:51] [Server thread/CRITICAL]: #19 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor() [00:58:51] [Server thread/CRITICAL]: #20 src/pocketmine/Server(1588): pocketmine\Server->start() [00:58:51] [Server thread/CRITICAL]: #21 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/) [00:58:51] [Server thread/CRITICAL]: #22 src/pocketmine/PocketMine(304): pocketmine\server()

Muqsit commented 4 years ago

As the error states, make sure facworld is loaded.

jaylac2000 commented 4 years ago

You should add a message for unloaded world “world not loaded” or something