PHP: $pk = new InventoryTransactionPacket(); $pk->transactionType = InventoryTransactionPacket::TYPE_USE_ITEM_ON_ENTITY; $pk->trData->actionType = InventoryTransactionPacket::USE_ITEM_ON_ENTITY_ACTION_ATTACK; $pk->trData->entityRuntimeId = $id; $pk->trData->hotbarSlot = 0; $pk->trData->itemInHand = Item::get(Item::DIAMOND_SWORD); $pk->trData->playerPos = $this->lastpos; $pk->trData->clickPos = $position; $pk->isCraftingPart = false; $pk->encode(); My code isnt working, but idk why. Can anybody please help me?
Attack an player nearby an player. I want to do this with an packet. The packet is sent by an proxy. I want to create a completly new Minigame.
Warning: Creating default object from empty value in C:\Users\SkyZoneMC\Desktop\Proxyyyyyyyy\plugins\SkyGame\src\Sky\Main.php on line 102