> For the complete documentation index, see [llms.txt](https://docs.kuzquality.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kuzquality.com/resources/premium-resources/shell-creator/api/server.md).

# Server

## Server sided events

The following event gets triggered whenever the shells list gets updated

> `kq_shellbuilder:updated`

No additional information is passed.

## Server exports

### GetShells

This export allows you to retrieve the shells information

```lua
-- Example
exports.kq_shellbuilder:GetShells()

-- Returns:
-- {
--     id = 1,
--     title = "My shell",
--     coords = {x = 0.0, y = 0.0, z = 0.0}, -- Coords of the IPL
--     spawnPoint = {x = -1.0, y = 2.0, z = 0.0}, -- The offset for the shell spawnpoint
-- }
```

### GetShellById

This exports allows you to retrieve full shell data, including the thumbnail

```lua
-- Example
exports.kq_shellbuilder:GetShellById(10)

-- Returns:
-- {
--     id = 10,
--     title = "My amazing shell",
--     coords = {x = 0.0, y = 0.0, z = 0.0}, -- Coords of the IPL
--     spawnPoint = {x = -1.0, y = 2.0, z = 0.0}, -- The offset for the shell spawnpoint
--     user = {name = "Kuz", id = "license:123123123123123"}
--     settings = {timecycle = 0, hideVoid = 1, teleporter= { y = -722.4,x = -211.5 ,w = 212.899,vehicles = 0, active = true,z = 33.599}}
--     thumbnail = data:image/webp;base64,Uk1Gr.....
--     createdAt = "2025-02-20 17:47:49"
--     updatedAt = "2025-02-20 17:47:49"
-- }
```
