menu
#9648622 Declaration of wfufu\ComandoComi::onEnable() must be compatible with pocketmine\plugin\PluginBase::onEnable(): void

Submitted by PocketMine-MP 5.8.2

General information

Version: 5.8.2
Git commit: c3c81b09
Plugin involvement: Direct
Report date: 2023-11-21 00:02:57 +0000 UTC
Server uptime: 0 days 0 hours 0 minutes 3 seconds

System Information

PHP version: 8.1.25
JIT status: Not available
Operating system: linux
System banner: Linux ea57bc9b-a3f0-4357-bd33-0b03c94fa731 5.15.0-87-generic #97-Ubuntu SMP Mon Oct 2 21:09:21 UTC 2023 x86_64

Error information

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

use pocketmine\plugin\PluginBase;
use pocketmine\event\Listener;
use pocketmine\event\player\PlayerCommandPreprocessEvent;
use pocketmine\Player;
use pocketmine\utils\TextFormat;

class ComandoComi extends PluginBase implements Listener {

public function onEnable() {
// Registra los eventos y realiza cualquier inicialización necesaria
$this->getServer()->getPluginManager()->registerEvents($this, $this);
}

public function onCommandPreprocess(PlayerCommandPreprocessEvent $event) {
$message = $event->getMessage();
$player = $event->getPlayer();

if (!$player->isOp() && $this->startsWith($message, '/"')) {
$player->sendMessage(TextFormat::RED . "No tienes permiso para usar comillas al inicio de un comando.");

Loaded Plugins

  • Show

Server Settings

  • Show

Installed Composer Dependencies

Installed PHP Extensions

  • Show