menu
#10624445 Declaration of Heady\spawn\Main::onEnable() must be compatible with pocketmine\plugin\PluginBase::onEnable(): void

Submitted by PocketMine-MP 5.13.0

General information

Version: 5.13.0
Git commit: f193a990
Plugin involvement: Direct
Report date: 2024-04-03 05:10:26 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 0 seconds

System Information

PHP version: 8.2.17
JIT status: Not available
Operating system: win
System banner: Windows NT SACHA 10.0 build 22631 (Windows 11) AMD64

Error information

Warning: a plugin was directly involved in this crash. Please contact the plugin author.
Thread: Main
Message: Declaration of Heady\spawn\Main::onEnable() must be compatible with pocketmine\plugin\PluginBase::onEnable(): void
File: plugins/Spawn/src/Heady/spawn/main
Line: #11
Type: E_COMPILE_ERROR
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

namespace Heady\spawn;

use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\plugin\PluginBase;

class Main extends PluginBase {

public function onEnable() {
$this->getLogger()->info("Plugin MonPlugin activé !");
}

public function onCommand(CommandSender $sender, Command $command, string $label, array $args): bool {
if ($command->getName() === "spawn") {
if ($sender instanceof Player) {
$sender->teleport(new Position(0, 60, 0, $sender->getLevel()));
$sender->sendMessage("Vous avez été téléporté au spawn !");
return true;
} else {

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies

Installed PHP Extensions

  • Show