menu
#4550532 Call to undefined method pocketmine\command\ConsoleCommandSender::getLevel()

Submitted by PocketMine-MP 3.15.1

General information

Version: 3.15.1
Git commit: 9f604842
Plugin involvement: Direct
Report date: 2020-09-26 21:14:12 +0000 UTC

System Information

PHP version: 7.3.19
Operating system: linux
System banner: Linux server19879 3.10.0-1062.4.2.vz7.116.7 #1 SMP Mon Dec 9 19:36:21 MSK 2019 x86_64

Error information

Warning: the RedSkyBlock plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method pocketmine\command\ConsoleCommandSender::getLevel()
File: plugins/sb.phar/src/RedCraftPE/RedSkyBlock/Commands/SubCommands/SetWorld
Line: #24
Error level: Error
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  public function __construct() {

self::$instance = $this;
}

public function onSetWorldCommand(CommandSender $sender): bool {

if ($sender->hasPermission("skyblock.setworld")) {

$world = $sender->getLevel()->getFolderName();
SkyBlock::getInstance()->cfg->set("SkyBlockWorld", $world);
SkyBlock::getInstance()->cfg->save();
$sender->sendMessage(TextFormat::GREEN . $world . " has been set as the SkyBlock world on this server.");
return true;
} else {

$sender->sendMessage(TextFormat::RED . "You do not have the proper permissions to run this command.");
return true;
}
}
#0 plugins/sb.phar/src/RedCraftPE/RedSkyBlock/Commands/Island(232): RedCraftPE\RedSkyBlock\Commands\SubCommands\SetWorld->onSetWorldCommand(object pocketmine\command\ConsoleCommandSender)
#1 plugins/sb.phar/src/RedCraftPE/RedSkyBlock/SkyBlock(102): RedCraftPE\RedSkyBlock\Commands\Island->onIslandCommand(object pocketmine\command\ConsoleCommandSender, object pocketmine\command\PluginCommand, string[2] is, array[2])
#2 src/pocketmine/command/PluginCommand(54): RedCraftPE\RedSkyBlock\SkyBlock->onCommand(object pocketmine\command\ConsoleCommandSender, object pocketmine\command\PluginCommand, string[2] is, array[2])
#3 src/pocketmine/command/SimpleCommandMap(248): pocketmine\command\PluginCommand->execute(object pocketmine\command\ConsoleCommandSender, string[2] is, array[2])
#4 src/pocketmine/Server(1811): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\command\ConsoleCommandSender, string[14] is setworld sb)
#5 src/pocketmine/Server(1423): pocketmine\Server->dispatchCommand(object pocketmine\command\ConsoleCommandSender, string[14] is setworld sb)
#6 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\Server->pocketmine\{closure}()
#7 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
#8 src/pocketmine/Server(2157): pocketmine\snooze\SleeperHandler->sleepUntil(double 1601154852.1274)
#9 src/pocketmine/Server(1994): pocketmine\Server->tickProcessor()
#10 src/pocketmine/Server(1588): pocketmine\Server->start()
#11 src/pocketmine/PocketMine(273): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[9] /home/sb/, string[17] /home/sb/plugins/)
#12 src/pocketmine/PocketMine(304): pocketmine\server()
#13 (11): require(string[64] phar:///home/sb/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies