/** * Trigger a Hack event. * * @param int $cheatType A constant from CheatType class. * @param int $severity A value that describes how severe this hack is. 0-10+ */ public function triggerDetection($cheatType, $severity) { if ($severity <= 0) { // This shouldn't happen, but in-case of bad plugins that have their own hooks! return; } NoCheatPEPlugin::getInstance()->getLogger()->debug("PlayerHackEvent: " . $this->getPlayer()->getName() . " - " . CheatType::getName($cheatType) . " VL " . $severity); $ev = new PlayerHackEvent($this->getPlayer(), $cheatType, $severity); Server::getInstance()->getPluginManager()->callEvent($ev); }