menu
#5038826 Call to undefined method pocketmine\command\ConsoleCommandSender::isSurvival()

Submitted by PocketMine-MP 3.22.0

General information

Version: 3.22.0
Git commit: c32c2146
Plugin involvement: Direct
Report date: 2021-07-22 06:30:10 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 4 seconds

System Information

PHP version: 7.4.20
Operating system: linux
System banner: Linux vanitymcpe 4.15.0-22-generic #24-Ubuntu SMP Wed May 16 12:15:17 UTC 2018 x86_64

Error information

Warning: the Sell plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method pocketmine\command\ConsoleCommandSender::isSurvival()
File: plugins/Sell (20).phar/src/SellHand/Main
Line: #71
Error level: Error
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
                /* Checks if command is executed by console. */ /* It further solves the crash problem. */
if(!$sender instanceof Player){
$sender->sendMessage(TF::RED . TF::BOLD . "Error: " . TF::RESET . TF::DARK_RED . "Please use this command in game!");
}

/* Check if the player is permitted to use the command */
if($sender->hasPermission("sell") || $sender->hasPermission("sell.hand") || $sender->hasPermission("sell.all")){

/* Disallow non-survival mode abuse */
if(!$sender->isSurvival()){
$sender->sendMessage(TF::RED . TF::BOLD . "Error: " . TF::RESET . TF::DARK_RED . "Please switch back to survival mode.");
}

/* Sell Hand */
if(isset($args[0]) && strtolower($args[0]) == "hand"){

if(!$sender->hasPermission("sell.hand")){
$error_handPermission = $this->messages->get("error-nopermission-sellHand");
$sender->sendMessage(TF::RED . TF::BOLD . "Error: " . TF::RESET . TF::RED . $error_handPermission);
}
#0 pmsrc/src/pocketmine/command/PluginCommand(54): SellHand\Main->onCommand(object pocketmine\command\ConsoleCommandSender, object pocketmine\command\PluginCommand, string[4] sell, array[0])
#1 pmsrc/src/pocketmine/command/SimpleCommandMap(248): pocketmine\command\PluginCommand->execute(object pocketmine\command\ConsoleCommandSender, string[4] sell, array[0])
#2 pmsrc/src/pocketmine/Server(1809): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\command\ConsoleCommandSender, string[4] sell)
#3 pmsrc/src/pocketmine/Server(1422): pocketmine\Server->dispatchCommand(object pocketmine\command\ConsoleCommandSender, string[4] sell)
#4 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(113): pocketmine\Server->pocketmine\{closure}()
#5 pmsrc/vendor/pocketmine/snooze/src/SleeperHandler(75): pocketmine\snooze\SleeperHandler->processNotifications()
#6 pmsrc/src/pocketmine/Server(2155): pocketmine\snooze\SleeperHandler->sleepUntil(double 1626935410.633)
#7 pmsrc/src/pocketmine/Server(1992): pocketmine\Server->tickProcessor()
#8 pmsrc/src/pocketmine/Server(1586): pocketmine\Server->start()
#9 pmsrc/src/pocketmine/PocketMine(291): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /home/pris/test/, string[24] /home/pris/test/plugins/)
#10 pmsrc/src/pocketmine/PocketMine(321): pocketmine\server()
#11 pmsrc(11): require(string[71] phar:///home/pris/test/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show