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