mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 18:59:00 +00:00
Resolved #3684
This commit is contained in:
parent
56644fed9d
commit
6945256e30
@ -108,6 +108,7 @@ use pocketmine\network\protocol\DisconnectPacket;
|
||||
use pocketmine\network\protocol\EntityEventPacket;
|
||||
use pocketmine\network\protocol\FullChunkDataPacket;
|
||||
use pocketmine\network\protocol\Info as ProtocolInfo;
|
||||
use pocketmine\network\protocol\InteractPacket;
|
||||
use pocketmine\network\protocol\MovePlayerPacket;
|
||||
use pocketmine\network\protocol\PlayerActionPacket;
|
||||
use pocketmine\network\protocol\PlayStatusPacket;
|
||||
@ -2299,6 +2300,11 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
||||
|
||||
$cancelled = false;
|
||||
|
||||
if($packet->action === InteractPacket::ACTION_RIGHT_CLICK){
|
||||
// TODO handle
|
||||
break;
|
||||
}
|
||||
|
||||
if(
|
||||
$target instanceof Player and
|
||||
$this->server->getConfigBoolean("pvp", true) === false
|
||||
|
@ -27,6 +27,9 @@ namespace pocketmine\network\protocol;
|
||||
class InteractPacket extends DataPacket{
|
||||
const NETWORK_ID = Info::INTERACT_PACKET;
|
||||
|
||||
const ACTION_LEFT_CLICK = 1;
|
||||
const ACTION_RIGHT_CLICK = 2;
|
||||
|
||||
public $action;
|
||||
public $eid;
|
||||
public $target;
|
||||
|
Loading…
x
Reference in New Issue
Block a user