> For the complete documentation index, see [llms.txt](https://trhologram.trixey.cc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trhologram.trixey.cc/api/trhologramapi.md).

# TrHologramAPI

## 方法

{% code title="TrHologramAPI.kt" %}

```kotlin
@JvmStatic
fun getHologramById(id: String): Hologram? {
    return Hologram.holograms.find { it.id == id }
}

@JvmStatic
fun createTextCompoent(
    initText: String,
    location: Location,
    tick: Long = -1,
    onTick: (HologramComponent) -> Unit = {}
): TextHologram {
    return TextHologram(initText, Position.fromLocation(location), tick, onTick)
}

@JvmStatic
fun createItemCompoent(
    initItem: ItemStack,
    location: Location,
    tick: Long = -1,
    onTick: (HologramComponent) -> Unit = {}
): ItemHologram {
    return ItemHologram(initItem, Position.fromLocation(location), tick, onTick)
}

@JvmStatic
fun builder(location: Location): HologramBuilder {
    return HologramBuilder(location = location)
}
```

{% endcode %}
