menu
#5777703 Declaration of pixelguy75\joincommands\Main::onEnable() must be compatible with pocketmine\plugin\PluginBase::onEnable(): void

Submitted by PocketMine-MP 4.0.6

General information

Version: 4.0.6
Git commit: f7d25f25
Plugin involvement: Direct
Report date: 2022-01-15 00:57:32 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 0 seconds

System Information

PHP version: 8.0.13
Operating system: win
System banner: Windows NT JEWELCRAFT-HOST 10.0 build 17763 (Windows 10) AMD64

Error information

Warning: a plugin was directly involved in this crash. Please contact the plugin author.
Message: Declaration of pixelguy75\joincommands\Main::onEnable() must be compatible with pocketmine\plugin\PluginBase::onEnable(): void
File: plugins/JoinCommands.phar/src/pixelguy75/joincommands/Main
Line: #16
Error level: E_COMPILE_ERROR
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use pocketmine\event\player\PlayerDeathEvent;
use pocketmine\event\player\PlayerJoinEvent;
use pocketmine\event\player\PlayerQuitEvent;
use pocketmine\event\player\PlayerRespawnEvent;
use pocketmine\event\Listener;
use pocketmine\plugin\PluginBase;
use pocketmine\Player;

class Main extends PluginBase implements Listener{
public function onEnable(){
$this->getServer()->getPluginManager()->registerEvents($this, $this);
$this->saveDefaultConfig();
}
public function onPreLogin(PlayerPreLoginEvent $event){
if($this->getConfig()->get("enablejoin") === true){
$player = $event->getPlayer();
foreach($this->getConfig()->get("JoinCommand") as $command){
$this->getServer()->dispatchCommand(new ConsoleCommandSender(), str_replace("{player}", $player->getName(), $command));
}
}

Loaded Plugins

  • Show

Server Settings

  • Show

Installed PHP Extensions

  • Show