Skip to content

Commit deff5bc

Browse files
committed
Support plugin messages during configuration phase
1 parent 6273ec6 commit deff5bc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/net/hypixel/modapi/fabric/FabricModAPI.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ private static void registerClientbound(String identifier) {
5757
CustomPayload.Id<ClientboundHypixelPayload> clientboundId = CustomPayload.id(identifier);
5858
PacketCodec<PacketByteBuf, ClientboundHypixelPayload> codec = ClientboundHypixelPayload.buildCodec(clientboundId);
5959
PayloadTypeRegistry.playS2C().register(clientboundId, codec);
60+
PayloadTypeRegistry.configurationS2C().register(clientboundId, codec);
6061

6162
// Also register the global receiver for handling incoming packets
6263
ClientPlayNetworking.registerGlobalReceiver(clientboundId, (payload, context) -> {
@@ -87,6 +88,7 @@ private static void registerServerbound(String identifier) {
8788
CustomPayload.Id<ServerboundHypixelPayload> serverboundId = CustomPayload.id(identifier);
8889
PacketCodec<PacketByteBuf, ServerboundHypixelPayload> codec = ServerboundHypixelPayload.buildCodec(serverboundId);
8990
PayloadTypeRegistry.playC2S().register(serverboundId, codec);
91+
PayloadTypeRegistry.configurationC2S().register(serverboundId, codec);
9092
} catch (IllegalArgumentException ignored) {
9193
// Ignored as this is fired when we reload the registrations and the packet is already registered
9294
}

0 commit comments

Comments
 (0)