// Client-only
if (Platform.isClientEnvironment()) {

  ClientEvents.init(() => {

    const $KeyMappingRegistry = Java.loadClass(
      "dev.architectury.registry.client.keymappings.KeyMappingRegistry"
    );
    const $KeyMapping = Java.loadClass("net.minecraft.client.KeyMapping");
    const $GLFWKey = Java.loadClass("org.lwjgl.glfw.GLFW");

    // Create keybind
    global.NINJAGO_SPINJITZU = new $KeyMapping(
      "key.ninjago.spinjitzu", // translation key
      $GLFWKey.GLFW_KEY_G,     // G key
      "key.categories.ninjago"
    );

    // Register keybind
    $KeyMappingRegistry.register(global.NINJAGO_SPINJITZU);
  });

}
