registerLuauPlugin method
Implementation
Future<SetonixPlugin> registerLuauPlugin(
String name,
String code, {
ItemLocation? location,
String? storageKey,
String? legacyStorageKey,
}) {
if (!isPluginSystemInitialized)
throw StateError('Plugin system not initialized');
return registerPlugin(
name,
(pluginServer) => RustSetonixPlugin.build(
(c) => LuauPlugin(code: code, callback: c),
pluginServer,
onPrint: (e) => server.print(e, name),
location: location ?? ItemLocation.fromString(name),
storageKey: storageKey ?? name,
legacyStorageKey: legacyStorageKey,
),
);
}