Skip to content

Commit 0b1c8fd

Browse files
committed
Update README.md
1 parent 5fc19bb commit 0b1c8fd

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ You can then include the dependency in your project.
4949
<dependency>
5050
<groupId>net.hypixel</groupId>
5151
<artifactId>mod-api</artifactId>
52-
<version>0.3.3</version>
52+
<version>0.4.0</version>
5353
</dependency>
5454
```
5555

5656
```gradle
5757
dependencies {
58-
implementation 'net.hypixel:mod-api:0.3.3'
58+
implementation 'net.hypixel:mod-api:0.4.0'
5959
}
6060
```
6161

@@ -64,7 +64,7 @@ Depending on your chosen mod loader, you will need to also include the `hypixel-
6464
```json
6565
{
6666
"depends": {
67-
"hypixel-mod-api": ">=0.3.3"
67+
"hypixel-mod-api": ">=0.4.0"
6868
}
6969
}
7070
```
@@ -98,3 +98,15 @@ public class Example {
9898
}
9999
}
100100
```
101+
102+
### Subscribing to a packet event
103+
104+
If you wish to receive a specific event packet, you will need to subscribe to the event. Once subscribed you can register a packet handler as normal (see example above).
105+
106+
```java
107+
public class Example {
108+
public void subscribeToPacketEvent() {
109+
HypixelModAPI.getInstance().subscribeToEventPacket(ClientboundLocationPacket.class);
110+
}
111+
}
112+
```

0 commit comments

Comments
 (0)