menu
#2387868 Call to undefined method pocketmine\command\ConsoleCommandSender::getInventory()

Submitted by PocketMine-MP 3.8.2

General information

Version: 3.8.2
Git commit: 5c81da9b
Plugin involvement: Direct
Report date: 2019-05-15 22:29:27 +0000 UTC

System Information

PHP version: 7.2.16
Operating system: linux
System banner: Linux 6eace696-9a7e-4cf7-86b5-87ded16d0ab7 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64

Error information

Warning: the Core plugin was directly involved in this crash. Please contact the plugin author.
Message: Call to undefined method pocketmine\command\ConsoleCommandSender::getInventory()
File: plugins/phar_Core_kj3loisL1pn44aV.phar/src/YaZrHoD/Commands/Staff/StaffMode
Line: #37
Error level: Error
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
        if ($staffmode == false){

}

if (isset($args[0])) {
switch ($args[0]) {
case "on":
$staffmode = true;
$sender->sendMessage("Bienvenue dans le mode staff!");
$sender->getInventory()->setItem(1, Item::get(345)-setCustomName("RandomTp"));

$KB = new EnchantementInstance(Enchantement::getEnchantment(Enchantement::KNOCKBACK));
$sender->getInventory()->setItem(3, Item::get(280)-setCustomName("KB")->addEnchantement($KB));

$sender->getInventory()->setItem(5, Item::get(340)-setCustomName("Informations"));

$sharp = new EnchantementInstance(Enchantement::getEnchantment(Enchantement::SHARPNESS));
$sender->getInventory()->setItem(7, Item::get(292)-setCustomName("Kill")->addEnchantement($sharp));
return true;
}
#0 src/pocketmine/command/SimpleCommandMap(270): YaZrHoD\Commands\Staff\StaffMode->execute(pocketmine\command\ConsoleCommandSender object, string staffmode, array Array())
#1 src/pocketmine/Server(2019): pocketmine\command\SimpleCommandMap->dispatch(pocketmine\command\ConsoleCommandSender object, string staffmode on)
#2 src/pocketmine/Server(1606): pocketmine\Server->dispatchCommand(pocketmine\command\ConsoleCommandSender object, string staffmode on)
#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 1557959367.173)
#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 /home/container/, string /home/container/plugins/)
#9 (1): require(string phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show