Updated sample Lua plugin to use newer API