88import net .fabricmc .fabric .api .client .networking .v1 .ClientPlayNetworking ;
99import net .fabricmc .fabric .api .networking .v1 .PayloadTypeRegistry ;
1010import net .minecraft .client .MinecraftClient ;
11- import net .playnimbus .NimbusUtils ;
1211import net .playnimbus .nimbusutils .modules .nimnite .NimniteClient ;
1312import net .playnimbus .nimbusutils .modules .nimnite .NimniteKeybinds ;
1413import net .playnimbus .nimbusutils .networking .HandshakePacket ;
@@ -38,7 +37,8 @@ public void onInitializeClient() {
3837 PayloadTypeRegistry .playS2C ().register (HandshakePacket .ID , HandshakePacket .CODEC );
3938 PayloadTypeRegistry .playC2S ().register (KeybindPacket .ID , KeybindPacket .CODEC );
4039
41- // handle incoming handshake packet
40+ // handle incoming handshake packets
41+ // note: we have to update this when new server types and modules are implemented
4242 ClientPlayNetworking .registerGlobalReceiver (HandshakePacket .ID , (packet , ctx ) -> {
4343 MinecraftClient client = ctx .client ();
4444
@@ -49,10 +49,13 @@ public void onInitializeClient() {
4949
5050 // enable the server type's submodule
5151 switch (SERVERTYPE ) {
52+ case 0 -> LOGGER .warn ("todo: hub implementation" );
5253 case 1 -> NIMNITE .setEnabled (true );
54+ default -> {
55+ NIMNITE .setEnabled (false );
56+ LOGGER .info ("Disabled all modules." );
57+ }
5358 }
54-
55- LOGGER .info ("handshake received: {}, serverType: {}" , state , SERVERTYPE );
5659 });
5760 });
5861
0 commit comments