Skip to content

Commit

Permalink
Update outdated PacketBatch documentation. (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
ipad54 authored Jul 14, 2024
1 parent bb23db5 commit 9252454
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Assuming you've decrypted and decompressed a Minecraft packet successfully, you'
With this library, that's currently done using `PacketBatch`, like so:

```php
foreach(PacketBatchUtils::decodePackets(new BinaryStream($payload), $protocolContext, PacketPool::getInstance()) as $packetObject){
foreach(PacketBatch::decodePackets(new BinaryStream($payload), PacketPool::getInstance()) as $packetObject){
var_dump($packetObject); //tada
}
```
Expand All @@ -25,7 +25,7 @@ This is easy:
```php
/** @var Packet[] $packets */
$stream = new BinaryStream();
PacketBatchUtils::encodePackets($stream, $protocolContext, $packets);
PacketBatch::encodePackets($stream, $packets);
$batchPayload = $stream->getBuffer();
```

Expand Down

0 comments on commit 9252454

Please sign in to comment.