menu
#4220859 Call to a member function setOp() on string

Submitted by PocketMine-MP 3.12.2

General information

Version: 3.12.2
Git commit: 9b6b3f50
Plugin involvement: None
Report date: 2020-05-23 07:07:04 +0000 UTC

System Information

PHP version: 7.3.14
Operating system: mac
System banner: Darwin unifi 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64

Error information

Message: Call to a member function setOp() on string
File: /Users/andreas/Downloads/CustomOP/src/Plugin/COP
Line: #19
Error level: Error
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

public function onEnable () {
$this->getLogger()->info("ยง6CustomOP Plugin Loaded!");
}

public function onCommand (CommandSender $sender, Command $command, $playerName, array $args): bool {
$commandName = $command->getName();
if ($commandName == 'cop' /* && $sender->hasPermission("per.cop") */) {
if ($args[0] == 'opplayer') {
$playerName->setOp(true);
} else if ($args[0] == "deopplayer") {
$playerName->setOp(false);
}
return true;
}
return false;
}
}

#0 src/pocketmine/command/PluginCommand(54): Plugin\COP->onCommand(object pocketmine\command\ConsoleCommandSender, object pocketmine\command\PluginCommand, string[3] cop, array[2])
#1 src/pocketmine/command/SimpleCommandMap(248): pocketmine\command\PluginCommand->execute(object pocketmine\command\ConsoleCommandSender, string[3] cop, array[2])
#2 src/pocketmine/Server(1807): pocketmine\command\SimpleCommandMap->dispatch(object pocketmine\command\ConsoleCommandSender, string[28] cop opplayer BatsTadpole8141)
#3 src/pocketmine/Server(1419): pocketmine\Server->dispatchCommand(object pocketmine\command\ConsoleCommandSender, string[28] cop opplayer BatsTadpole8141)
#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(2146): pocketmine\snooze\SleeperHandler->sleepUntil(double 1590217624.6895)
#7 src/pocketmine/Server(1990): pocketmine\Server->tickProcessor()
#8 src/pocketmine/Server(1584): pocketmine\Server->start()
#9 src/pocketmine/PocketMine(272): pocketmine\Server->__construct(object BaseClassLoader, object pocketmine\utils\MainLogger, string[16] /private/tmp/pm/, string[24] /private/tmp/pm/plugins/)
#10 src/pocketmine/PocketMine(295): pocketmine\server()
#11 (11): require(string[71] phar:///private/tmp/pm/PocketMine-MP.phar/src/pocketmine/PocketMine.php)

Loaded Plugins

  • Show

Server Settings

  • Show