#7034442 Declaration of mp\mp::onEnable() must be compatible with pocketmine\plugin\PluginBase::onEnable(): void
Submitted by PocketMine-MP 4.5.1
General information
Version: | 4.5.1 |
---|---|
Git commit: | d641812c |
Plugin involvement: | Direct |
Report date: | 2022-06-23 11:48:02 +0000 UTC |
Server uptime: | 0 days 0 hours 0 minutes 0 seconds |
System Information
PHP version: | 8.0.19 |
---|---|
Operating system: | linux |
System banner: | Linux ruvds-g4gxu 5.4.0-97-generic #110-Ubuntu SMP Thu Jan 13 18:22:13 UTC 2022 x86_64 |
Error information
Warning: a plugin was directly involved in this crash. Please contact the plugin author.
Message: | Declaration of mp\mp::onEnable() must be compatible with pocketmine\plugin\PluginBase::onEnable(): void |
---|---|
File: | plugins/ModerPanelPrismarineMC/src/mp/mp |
Line: | #24 |
Error level: | E_COMPILE_ERROR |
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use pocketmine\Player;
use pocketmine\Server;
class mp extends PluginBase implements Listener {
public $players;
public $ban;
public function onEnable(){
$this->getLogger()->info("Плагин на PlayerTeleport запущен! Автор: gegan");
$this->getServer()->getPluginManager()->registerEvents($this, $this);
@mkdir($this->getDataFolder());
$this->players = new Config($this->getDataFolder()."players.yml", Config::YAML);
$this->ban = new Config($this->getDataFolder()."ban.yml", Config::YAML);
}
public function onBan(PlayerPreLoginEvent $e){
$p = $e->getPlayer();
if($this->ban->exists(strtolower($p->getName()))){
$p->close("", "§e§lВы были заблокированы на сервере!");
Loaded Plugins
-
Show
Server Settings
-
Show
Installed Composer Dependencies
-
Show
Installed PHP Extensions
-
Show