menu
#4550314 Cannot redeclare TvGames\Rangshop\Main::onCommand()

Submitted by PocketMine-MP 3.15.1

General information

Version: 3.15.1
Git commit: 9f604842
Plugin involvement: Direct
Report date: 2020-09-26 17:47:32 +0000 UTC

System Information

PHP version: 7.3.14
Operating system: win
System banner: Windows NT DESKTOP-T18IBII 10.0 build 18362 (Windows 10) AMD64

Error information

Warning: a plugin was directly involved in this crash. Please contact the plugin author.
Message: Cannot redeclare TvGames\Rangshop\Main::onCommand()
File: plugins/Testplugin/src/TvGames/Rangshop/Main
Line: #26
Error level: E_COMPILE_ERROR
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
          $sender->sendMessage("This Command Only Works for players! Please perform this command IN GAME!");
}else{
$sender->sendMessage("Du hast dich geheilt");
$sender->setHealth(20);

}
}
return true;
}
public function onCommand(CommandSender $sender, Command $cmd, string $label, array $args) : bool{
if($cmd->getName() == "test2"){
if(!$sender instanceof Player){
$sender->sendMessage("es ist ein ingame command");
}else{
$sender->sendMessage("dein hunger ist verschwunden");
$sender->setHundger(10);
}
}
}

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies