Skip to content

Commit 6dc03cb

Browse files
committed
feat: C2SModAPIConnect
1 parent 2be43cb commit 6dc03cb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/main/java/com/mcdiamondfire/proto/ModAPIMessages.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public final class ModAPIMessages {
4343

4444
// Player.
4545
registerMessage(C2SPlayerTeleport.class, "c2s_player_teleport");
46+
registerMessage(C2SModAPIConnect.class, "mc2s_modapi_connect");
4647

4748
}
4849

src/main/proto/serverbound_player.proto

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,10 @@ option java_multiple_files = true;
99
message C2SPlayerTeleport {
1010
WorldLocation location = 1; // The location to teleport to.
1111
}
12+
13+
// Notifies the server you are interested in receiving ModAPI messages.
14+
// This must be sent before any ModAPI messages are sent by the client.
15+
// If the protocol versions are major version incompatible, the request will be voided.
16+
message C2SModAPIConnect {
17+
string protocol_version = 1; // The version of the protocol the client is using.
18+
}

0 commit comments

Comments
 (0)