added new PlayerActionPacket constant, silence debug noise every time a player clicks a block

This commit is contained in:
Dylan K. Taylor 2019-07-14 17:30:37 +01:00
parent 9b5ae7ec75
commit 6839712394
2 changed files with 3 additions and 0 deletions

View File

@ -2855,6 +2855,8 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
case PlayerActionPacket::ACTION_STOP_SWIMMING: case PlayerActionPacket::ACTION_STOP_SWIMMING:
//TODO: handle this when it doesn't spam every damn tick (yet another spam bug!!) //TODO: handle this when it doesn't spam every damn tick (yet another spam bug!!)
break; break;
case PlayerActionPacket::ACTION_INTERACT_BLOCK: //ignored (for now)
break;
default: default:
$this->server->getLogger()->debug("Unhandled/unknown player action type " . $packet->action . " from " . $this->getName()); $this->server->getLogger()->debug("Unhandled/unknown player action type " . $packet->action . " from " . $this->getName());
return false; return false;

View File

@ -56,6 +56,7 @@ class PlayerActionPacket extends DataPacket{
public const ACTION_STOP_SWIMMING = 22; public const ACTION_STOP_SWIMMING = 22;
public const ACTION_START_SPIN_ATTACK = 23; public const ACTION_START_SPIN_ATTACK = 23;
public const ACTION_STOP_SPIN_ATTACK = 24; public const ACTION_STOP_SPIN_ATTACK = 24;
public const ACTION_INTERACT_BLOCK = 25;
/** @var int */ /** @var int */
public $entityRuntimeId; public $entityRuntimeId;