menu
#3744737 Call to a member function getProvider() on null

Submitted by PocketMine-MP 3.8.4

General information

Version: 3.8.4
Git commit: a42f68d3
Plugin involvement: Direct
Report date: 2020-02-11 21:24:32 +0000 UTC

System Information

PHP version: 7.2.5
Operating system: linux
System banner: Linux batrmc-sq 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64

Error information

Warning: the MultiWorld plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to a member function getProvider() on null
File: /ssd/mu/servers/server2045/plugins/MultiWorld.phar/src/czechpmdevs/multiworld/api/WorldManagementAPI
Line: #171
Error level: Error
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
    public static function renameLevel(string $oldName, string $newName) {
if(self::isLevelLoaded($oldName)) self::unloadLevel(self::getLevel($oldName));

$from = Server::getInstance()->getDataPath() . "/worlds/" . $oldName;
$to = Server::getInstance()->getDataPath() . "/worlds/" . $newName;

rename($from, $to);

self::loadLevel($newName);
$provider = self::getLevel($newName)->getProvider();

if(!$provider instanceof BaseLevelProvider) return;
$provider->getLevelData()->setString("LevelName", $newName);
$provider->saveLevelData();

self::unloadLevel(self::getLevel($newName));
self::loadLevel($newName); // reloading the level
}

/**
#0 /ssd/mu/servers/server2045/plugins/MultiWorld.phar/src/czechpmdevs/multiworld/command/subcommand/RenameSubcommand(67): czechpmdevs\multiworld\api\WorldManagementAPI::renameLevel(string[6] nether, string[7] nether1)
#1 /ssd/mu/servers/server2045/plugins/MultiWorld.phar/src/czechpmdevs/multiworld/command/MultiWorldCommand(117): czechpmdevs\multiworld\command\subcommand\RenameSubcommand->executeSub(object pocketmine\command\ConsoleCommandSender, array[2], string[6] rename)
#2 src/pocketmine/command/SimpleCommandMap(270): czechpmdevs\multiworld\command\MultiWorldCommand->execute(object pocketmine\command\ConsoleCommandSender, string[2] mw, array[2])
#3 src/pocketmine/Server(2019): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\command\ConsoleCommandSender, string[24] mw rename nether nether1)
#4 src/pocketmine/Server(1606): pocketmine\Server->dispatchCommand(object pocketmine\command\ConsoleCommandSender, string[24] mw rename nether nether1)
#5 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\Server->pocketmine\{closure}()
#6 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
#7 src/pocketmine/Server(2338): pocketmine\snooze\SleeperHandler->sleepUntil(double 1581456272.0512)
#8 src/pocketmine/Server(2195): pocketmine\Server->tickProcessor()
#9 src/pocketmine/Server(1774): pocketmine\Server->start()
#10 src/pocketmine/PocketMine(266): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[28] /ssd/mu/servers/server2045//, string[36] /ssd/mu/servers/server2045//plugins/)
#11 (1): require(string[71] phar:///ssd/mu/servers/server2045/pm.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show