@@ -46,13 +46,13 @@ You can then include the dependency in your project.
46
46
<dependency >
47
47
<groupId >net.hypixel</groupId >
48
48
<artifactId >mod-api</artifactId >
49
- <version >0.4 .0</version >
49
+ <version >0.5 .0</version >
50
50
</dependency >
51
51
```
52
52
53
53
``` gradle
54
54
dependencies {
55
- implementation 'net.hypixel:mod-api:0.4 .0'
55
+ implementation 'net.hypixel:mod-api:0.5 .0'
56
56
}
57
57
```
58
58
@@ -61,7 +61,7 @@ Depending on your chosen mod loader, you will need to also include the `hypixel-
61
61
``` json
62
62
{
63
63
"depends" : {
64
- "hypixel-mod-api" : " >=0.4 .0"
64
+ "hypixel-mod-api" : " >=0.5 .0"
65
65
}
66
66
}
67
67
```
@@ -75,7 +75,7 @@ Once you have the API added to your project you can start using it. Below are ex
75
75
``` java
76
76
public class Example {
77
77
public void sendPacket () {
78
- HypixelModAPI . getInstance(). sendPacket(new ServerboundLocationPacket ());
78
+ HypixelModAPI . getInstance(). sendPacket(new ServerboundPartyInfoPacket ());
79
79
}
80
80
}
81
81
```
@@ -86,11 +86,8 @@ public class Example {
86
86
87
87
public class Example {
88
88
public void registerPacketHandler () {
89
- HypixelModAPI . getInstance(). registerHandler(new ClientboundPacketHandler () {
90
- @Override
91
- public void onLocationPacket (ClientboundLocationPacket packet ) {
92
- packet. getServerName();
93
- }
89
+ HypixelModAPI . getInstance(). registerHandler(ClientboundLocationPacket . class, packet - > {
90
+ packet. getServerName();
94
91
});
95
92
}
96
93
}
0 commit comments