menu
#2823461 Call to undefined method buildingprimary\cmds\sudoCmd::getDataFolder()

Submitted by PocketMine-MP 3.9.4

General information

Version: 3.9.4
Git commit: 1be6783c
Plugin involvement: Direct
Report date: 2019-09-11 04:28:08 +0000 UTC

System Information

PHP version: 7.2.20
Operating system: linux
System banner: Linux b01ef59e-4cd0-47f8-9926-3a52a4821863 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64

Error information

Warning: the CoreX plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method buildingprimary\cmds\sudoCmd::getDataFolder()
File: plugins/CoreX.phar/src/BuildingPrimary/cmds/sudoCmd
Line: #34
Error level: Error
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
    private $plugin;

public function __construct($plugin) {
$this->plugin = $plugin;
parent::__construct("sudo", "Sudo another user", "/sudo <player> <command | c:message>", ["sudo", "as", "runas"]);
}

public function execute(CommandSender $sender, string $label, array $args) {
// This way you wont have to restart the server.
$settings = new Config($this->getDataFolder() . "settings.yml", Config::YAML);
// To make it easier for myself.
$prefix = Main::PREFIX;
$selfSudo = $settings->get("allowSelfSudo");

if("sudo" == "sudo") {
// Handle permissions.
if (!$sender->hasPermission("bp.cmd.sudo")) {
$sender->sendMessage($prefix . "ยง6You do not have permission to use this command.");
return true;
}
#0 src/pocketmine/command/SimpleCommandMap(270): buildingprimary\cmds\sudoCmd->execute(object pocketmine\command\ConsoleCommandSender, string[4] sudo, array[0])
#1 src/pocketmine/Server(2029): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\command\ConsoleCommandSender, string[4] sudo)
#2 src/pocketmine/Server(1616): pocketmine\Server->dispatchCommand(object pocketmine\command\ConsoleCommandSender, string[4] sudo)
#3 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\Server->pocketmine\{closure}()
#4 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
#5 src/pocketmine/Server(2348): pocketmine\snooze\SleeperHandler->sleepUntil(double 1568176088.5564)
#6 src/pocketmine/Server(2205): pocketmine\Server->tickProcessor()
#7 src/pocketmine/Server(1784): pocketmine\Server->start()
#8 src/pocketmine/PocketMine(275): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/container/, string[24] /home/container/plugins/)
#9 src/pocketmine/PocketMine(299): pocketmine\server()
#10 (1): require(string[71] phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show