mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 03:08:58 +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\EntityEventPacket;
|
||||||
use pocketmine\network\protocol\FullChunkDataPacket;
|
use pocketmine\network\protocol\FullChunkDataPacket;
|
||||||
use pocketmine\network\protocol\Info as ProtocolInfo;
|
use pocketmine\network\protocol\Info as ProtocolInfo;
|
||||||
|
use pocketmine\network\protocol\InteractPacket;
|
||||||
use pocketmine\network\protocol\MovePlayerPacket;
|
use pocketmine\network\protocol\MovePlayerPacket;
|
||||||
use pocketmine\network\protocol\PlayerActionPacket;
|
use pocketmine\network\protocol\PlayerActionPacket;
|
||||||
use pocketmine\network\protocol\PlayStatusPacket;
|
use pocketmine\network\protocol\PlayStatusPacket;
|
||||||
@ -2299,6 +2300,11 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
|
|
||||||
$cancelled = false;
|
$cancelled = false;
|
||||||
|
|
||||||
|
if($packet->action === InteractPacket::ACTION_RIGHT_CLICK){
|
||||||
|
// TODO handle
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(
|
if(
|
||||||
$target instanceof Player and
|
$target instanceof Player and
|
||||||
$this->server->getConfigBoolean("pvp", true) === false
|
$this->server->getConfigBoolean("pvp", true) === false
|
||||||
|
@ -27,6 +27,9 @@ namespace pocketmine\network\protocol;
|
|||||||
class InteractPacket extends DataPacket{
|
class InteractPacket extends DataPacket{
|
||||||
const NETWORK_ID = Info::INTERACT_PACKET;
|
const NETWORK_ID = Info::INTERACT_PACKET;
|
||||||
|
|
||||||
|
const ACTION_LEFT_CLICK = 1;
|
||||||
|
const ACTION_RIGHT_CLICK = 2;
|
||||||
|
|
||||||
public $action;
|
public $action;
|
||||||
public $eid;
|
public $eid;
|
||||||
public $target;
|
public $target;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user