menu
#2387733 Undefined variable: staffmode

Submitted by PocketMine-MP 3.8.2

General information

Version: 3.8.2
Git commit: 5c81da9b
Plugin involvement: Direct
Report date: 2019-05-15 21:02:21 +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: Undefined variable: staffmode
File: plugins/phar_Core_w_Toip0j7AY5jqU.phar/src/YaZrHoD/Commands/Staff/StaffMode
Line: #26
Error level: ErrorException
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
	public function __construct(){
$this->plugin = BaseAPI::getInstance();

parent::__construct("staffmode", "-StaffMode- Staff");
$this->setPermission("arion.staffmode.commands");
}
public function execute(CommandSender $sender, string $commandLabel, array $args): bool{
if(!$this->testPermission($sender)) return false;

if ($staffmode == false){

}

if (isset($args[0])) {
switch ($args[0]) {
case "on":
$staffmode = true;
if ($staffmode == true){
$sender->sendMessage("Bienvenue dans le mode staff!");
$sender->getInventory()->setItem(1, Item::get(345)-setCustomName("RandomTp"));
#0 plugins/phar_Core_w_Toip0j7AY5jqU.phar/src/YaZrHoD/Commands/Staff/StaffMode(26): pocketmine\utils\Utils::errorExceptionHandler(integer 8, string Undefined variable: staffmode, string phar:///home/container/plugins/phar_Core_w_Toip0j7AY5jqU.phar/src/YaZrHoD/Commands/Staff/StaffMode.php, integer 26, array Array())
#1 src/pocketmine/command/SimpleCommandMap(270): YaZrHoD\Commands\Staff\StaffMode->execute(pocketmine\command\ConsoleCommandSender object, string staffmode, array Array())
#2 src/pocketmine/Server(2019): pocketmine\command\SimpleCommandMap->dispatch(pocketmine\command\ConsoleCommandSender object, string staffmode)
#3 src/pocketmine/Server(1606): pocketmine\Server->dispatchCommand(pocketmine\command\ConsoleCommandSender object, string staffmode)
#4 vendor/pocketmine/snooze/src/SleeperHandler(123): pocketmine\Server->pocketmine\{closure}()
#5 vendor/pocketmine/snooze/src/SleeperHandler(85): pocketmine\snooze\SleeperHandler->processNotifications()
#6 src/pocketmine/Server(2337): pocketmine\snooze\SleeperHandler->sleepUntil(double 1557954141.0968)
#7 src/pocketmine/Server(2195): pocketmine\Server->tickProcessor()
#8 src/pocketmine/Server(1774): pocketmine\Server->start()
#9 src/pocketmine/PocketMine(266): pocketmine\Server->__construct(BaseClassLoader object, pocketmine\utils\MainLogger object, string /home/container/, string /home/container/plugins/)
#10 (1): require(string phar:///home/container/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show