1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

need help

Discussion in 'Facepalm' started by alex987, Jul 19, 2017.

Thread Status:
Not open for further replies.
  1. alex987

    alex987 Creeper

    Messages:
    2
    what i need to change to make this plugin work again

    PHP:
    public function onPacketReceived(DataPacketReceiveEvent $event){
            
    $pk $event->getPacket();
            
    $player $event->getPlayer();
            if(
    $pk instanceof UseItemPacket and $pk->face === 0xff) {
            
    $item $player->getInventory()->getItemInHand();
            if(
    $item->getId() == 290){
            foreach(
    $player->getInventory()->getContents() as $item){
                    if (
    $item->getID() == 351 && $item->getDamage() == && $item->getCount() > 0){
                            
    $nbt = new CompoundTag "", [ 
                    
    "Pos" => new ListTag "Pos", [ 
                            new 
    DoubleTag ""$player->),
                            new 
    DoubleTag ""$player->$player->getEyeHeight () ),
                            new 
    DoubleTag ""$player->
                    ] ),
                    
    "Motion" => new ListTag "Motion", [ 
                            new 
    DoubleTag "", - \sin $player->yaw 180 M_PI ) *\cos $player->pitch 180 M_PI ) ),
                            new 
    DoubleTag "", - \sin $player->pitch 180 M_PI ) ),
                            new 
    DoubleTag "",\cos $player->yaw 180 M_PI ) *\cos $player->pitch 180 M_PI ) ) 
                    ] ),
                    
    "Rotation" => new ListTag "Rotation", [ 
                            new 
    FloatTag ""$player->yaw ),
                            new 
    FloatTag ""$player->pitch 
                    ] ) 
            ] );
     
  2. alex987

    alex987 Creeper

    Messages:
    2
    this is weapon plugins
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.