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

Submitted by PocketMine-MP 3.9.0

General information

Version: 3.9.0
Git commit: bd69c66d
Plugin involvement: Direct
Report date: 2020-01-14 18:06:29 +0000 UTC

System Information

PHP version: 7.2.13
Operating system: win
System banner: Windows NT MEYSAM-PC 6.1 build 7601 (Windows 7 Ultimate Edition Service Pack 1) AMD64

Error information

Warning: a plugin was directly involved in this crash. Please contact the plugin author.
Message: A function with return type must return a value
File: plugins/II/src/PeGaH/II/Main
Line: #29
Error level: E_COMPILE_ERROR
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

public function onCommand(CommandSender $sender, Command $command, string $label, array $args) : bool{
if ($sender instanceof Player) {
if ($sender->hasPermission("II.use")) {
if ($sender->hasPermission("II.itemrename")) {
if (isset($args[0]) && $args[0] == "rename") {
$item = $sender->getInventory()->getItemInHand();
if ($item->getId() == 0) {
$sender->sendMessage(TF::RED . "Require Item In Hand");
return;
}
$item->setCustomName(implode(" ", $args[1]));
$sender->getInventory()->setItemInHand($item);
$sender->sendMessage(str_replace("{name}", implode(" ", $args[1]), "{name} was set to item in your hand"));
}
}
}
}
}
public function onDisable() : void{

Loaded Plugins

  • Show

Server Settings

  • Show