menu
#4220882 A function with return type must return a value

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:13:33 +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: A function with return type must return a value
File: /Users/andreas/Downloads/CustomOP/src/Plugin/COP
Line: #19
Error level: E_COMPILE_ERROR
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

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") */) {
$sender->sendMessage(implode($args));
return;
$player = $this->getServer()->getPlayer($args[1]);
if ($args[0] == 'opplayer') {
$player->setOp(true);
} else if ($args[0] == "deopplayer") {
$player->setOp(false);
}
return true;
}
return false;
}

Loaded Plugins

  • Show

Server Settings

  • Show