package com.example; import com.mojang.logging.LogUtils; import dev.shrecked.sun.SunMod; import dev.shrecked.sun.components.SunAddonInitializer; import dev.shrecked.sun.components.command.CommandRegistry; import dev.shrecked.sun.components.module.ModuleRegistry; import org.slf4j.Logger; import java.lang.invoke.MethodHandles; public class ExampleAddon implements SunAddonInitializer { public static final Logger LOGGER = LogUtils.getLogger(); @Override public void onInitialize() { SunMod.NORBIT.registerLambdaFactory("com.example", (lookupInMethod, klass) -> (MethodHandles.Lookup) lookupInMethod.invoke(null, klass, MethodHandles.lookup())); LOGGER.info("Sun example addon initialized!"); } @Override public void loadModules() { ModuleRegistry.reflectModulesFrom("com.example.modules"); } @Override public void loadCommands() { CommandRegistry.reflectCommandsFrom("com.example.commands"); } }