menu
#2468851 Call to undefined method pocketmine\command\ConsoleCommandSender::getPlayer()

Submitted by PocketMine-MP 3.8.2

General information

Version: 3.8.2
Git commit: 5c81da9b
Plugin involvement: Direct
Report date: 2019-06-12 07:55:31 +0000 UTC

System Information

PHP version: 7.2.17
Operating system: linux
System banner: Linux 9853f807af6d 3.10.0-957.10.1.el7.x86_64 #1 SMP Mon Mar 18 15:06:45 UTC 2019 x86_64

Error information

Warning: the aSkinSaver plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method pocketmine\command\ConsoleCommandSender::getPlayer()
File: plugins/aSkinSaver_src/src/AlexBrin/commands/SetSkinCommand
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
     * @param CommandSender $sender
* @param string $commandLabel
* @param string[] $args
*
* @return mixed
*/
public function execute(CommandSender $sender, string $commandLabel, array $args): bool {
$player = array_shift($args);
if(!$player) {
$player = $sender->getPlayer();
}
else {
$player = aSkinSaver::getInstance()->getServer()->getPlayer($player);
if(!$player) {
$sender->sendMessage("§ePlayer offline");
return true;
}
}

$skinName = array_shift($args);
#0 src/pocketmine/command/SimpleCommandMap(270): AlexBrin\commands\SetSkinCommand->execute(pocketmine\command\ConsoleCommandSender object, string setskin, array Array())
#1 src/pocketmine/Server(2019): pocketmine\command\SimpleCommandMap->dispatch(pocketmine\command\ConsoleCommandSender object, string setskin)
#2 src/pocketmine/Server(1606): pocketmine\Server->dispatchCommand(pocketmine\command\ConsoleCommandSender object, string setskin)
#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(2337): pocketmine\snooze\SleeperHandler->sleepUntil(double 1560326131.3595)
#6 src/pocketmine/Server(2195): pocketmine\Server->tickProcessor()
#7 src/pocketmine/Server(1774): pocketmine\Server->start()
#8 src/pocketmine/PocketMine(266): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /srv/data/, string /srv/data/plugins/)
#9 (1): require(string phar:///srv/data/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show