Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/pocketmine/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
use pocketmine\event\player\PlayerToggleSneakEvent;
use pocketmine\event\player\PlayerToggleSprintEvent;
use pocketmine\event\server\DataPacketSendEvent;
use pocketmine\event\server\DataPacketReceiveEvent;
use pocketmine\event\TextContainer;
use pocketmine\event\Timings;
use pocketmine\inventory\BaseTransaction;
Expand Down Expand Up @@ -1698,6 +1699,7 @@ public function eatFoodInHand() {
* @param DataPacket $packet
*/
public function handleDataPacket(DataPacket $packet){
$this->server->getPluginManager()->callEvent(new DataPacketReceiveEvent($this, $packet));
if($this->connected === false){
return;
}
Expand All @@ -1710,7 +1712,6 @@ public function handleDataPacket(DataPacket $packet){
$this->subClients[$packet->targetSubClientID]->handleDataPacket($packet);
return;
}

switch($packet->pname()){
case 'SET_PLAYER_GAMETYPE_PACKET':
file_put_contents("./logs/possible_hacks.log", date('m/d/Y h:i:s a', time()) . " SET_PLAYER_GAMETYPE_PACKET " . $this->username . PHP_EOL, FILE_APPEND | LOCK_EX);
Expand Down