Error: syntax error, unexpected 'public' (T_PUBLIC)
File: Ho/src/HP/Main
Line: 72
Type: ParseError
<?php
namespace HP;
use pocketmine\Player;
use pocketmine\plugin\PluginBase;
use pocketmine\event\Listener;
use pocketmine\event\entity\EntityDamageByEntityEvent;
use pocketmine\event\entity\EntityDamageEvent;
class Main extends PluginBase implements Listener {
public function onEnable (){
$this->getServer()->getPluginManager()->registerEvents($this, $this);
$this->getLogger()->info("Тот же плагин XGTShowPlayerHP котрый был на 1.16");
$this->getLogger()->info("Но qq_BCEM перековал его на 1.1.5");
}
public function onDamage(EntityDamageEvent $event) {
if($event instanceof EntityDamageByEntityEvent) {
$p = $event->getDamager();
if($p instanceof Player) {
$hp = $event->getEntity()->getHealth();
$n = $event->getEntity()->getName();
if($hp == 20) {
$p->sendTip("§l§a{$n}§4 ❤❤❤❤❤❤❤❤❤❤");
}elseif($hp == 19) {
$p->sendTip("§l§a{$n}§4 ❤❤❤❤❤❤❤❤❤§c❤");
}elseif($hp == 18) {
$p->sendTip("§l§a{$n}§4 ❤❤❤❤❤❤❤❤❤§7❤");
}elseif($hp == 17) {
$p->sendTip("§l§a{$n}§4 ❤❤❤❤❤❤❤❤§c❤§7❤");
}elseif($hp == 16) {
$p->sendTip("§l§a{$n}§4 ❤❤❤❤❤❤❤❤§7❤❤");
}elseif($hp == 15) {
$p->sendTip("§l§a{$n}§4 ❤❤❤❤❤❤❤§c❤§7❤❤");
}elseif($hp == 14) {
$p->sendTip("§l§a{$n}§4 ❤❤❤❤❤❤❤§7❤❤❤");
}elseif($hp == 13) {
$p->sendTip("§l§a{$n}§4 ❤❤❤❤❤❤§c❤§7❤❤❤");
}elseif($hp == 12) {
$p->sendTip("§l§a{$n}§4 ❤❤❤❤❤❤§7❤❤❤❤");
}elseif($hp == 11) {
$p->sendTip("§l§a{$n}§4 ❤❤❤❤❤§c❤§7❤❤❤❤");
}elseif($hp == 10) {
$p->sendTip("§l§a{$n}§4 ❤❤❤❤❤§7❤❤❤❤❤");
}elseif($hp == 9) {
$p->sendTip("§l§a{$n}§4 ❤❤❤❤§c❤§7❤❤❤❤❤");
}elseif($hp == 8) {
$p->sendTip("§l§a{$n}§4 ❤❤❤❤§7❤❤❤❤❤❤");
}elseif($hp == 7) {
$p->sendTip("§l§a{$n}§4 ❤❤❤§c❤§7❤❤❤❤❤❤");
}elseif($hp == 6) {
$p->sendTip("§l§a{$n}§4 ❤❤❤§7❤❤❤❤❤❤❤");
}elseif($hp == 5) {
$p->sendTip("§l§a{$n}§4 ❤❤§c❤§7❤❤❤❤❤❤❤");
}elseif($hp == 4) {
$p->sendTip("§l§a{$n}§4 ❤❤§7❤❤❤❤❤❤❤❤");
}elseif($hp == 3) {
$p->sendTip("§l§a{$n}§4 ❤§c❤§7❤❤❤❤❤❤❤❤");
}elseif($hp == 2) {
$p->sendTip("§l§a{$n}§4 ❤§7❤❤❤❤❤❤❤❤❤");
}elseif($hp == 1) {
$p->sendTip("§l§a{$n}§4 §c❤§7❤❤❤❤❤❤❤❤❤");
}elseif($hp == 0) {
$p->sendTip("§l§a{$n}§4 §7♰♰♰♰♰♰♰♰♰♰");
}
}
}
public function onDisable() {
$this->getLogger()->info("Плагин выключен");
}
}
}
?>
Пожалуйста