28    public const NETWORK_ID = ProtocolInfo::REQUEST_PERMISSIONS_PACKET;
 
   30    public const FLAG_BUILD = 1 << 0;
 
   31    public const FLAG_MINE = 1 << 1;
 
   32    public const FLAG_DOORS_AND_SWITCHES = 1 << 2;
 
   33    public const FLAG_OPEN_CONTAINERS = 1 << 3;
 
   34    public const FLAG_ATTACK_PLAYERS = 1 << 4;
 
   35    public const FLAG_ATTACK_MOBS = 1 << 5;
 
   36    public const FLAG_OPERATOR = 1 << 6;
 
   37    public const FLAG_TELEPORT = 1 << 7;
 
   39    private int $targetActorUniqueId;
 
   41    private int $playerPermission;
 
   42    private int $customFlags;
 
   47    public static function create(
int $targetActorUniqueId, 
int $playerPermission, 
int $customFlags) : self{
 
   49        $result->targetActorUniqueId = $targetActorUniqueId;
 
   50        $result->playerPermission = $playerPermission;
 
   51        $result->customFlags = $customFlags;
 
 
   55    public function getTargetActorUniqueId() : int{ return $this->targetActorUniqueId; }
 
   60    public function getCustomFlags() : int{ return $this->customFlags; }
 
   63        $this->targetActorUniqueId = LE::readSignedLong($in);
 
   64        $this->playerPermission = VarInt::readSignedInt($in);
 
   65        $this->customFlags = LE::readUnsignedShort($in);
 
 
   69        LE::writeSignedLong($out, $this->targetActorUniqueId);
 
   70        VarInt::writeSignedInt($out, $this->playerPermission);
 
   71        LE::writeUnsignedShort($out, $this->customFlags);
 
 
   75        return $handler->handleRequestPermissions($this);