loadGameMode method
Implementation
Future<SetonixPlugin?> loadGameMode(
AssetManager assetManager,
ItemLocation? location,
) async {
if (location == null) return null;
final gameMode = assetManager
.getPack(location.namespace)
?.getMode(location.id);
if (gameMode == null) return null;
final script = gameMode.script;
if (script == null || script.isEmpty) return null;
final scriptLocation = ItemLocation.fromString(script, location.namespace);
return loadLuaPluginFromLocation(assetManager, scriptLocation);
}