TrHologram
搜索文档…
TrHologramAPI

方法

TrHologramAPI.kt
1
@JvmStatic
2
fun getHologramById(id: String): Hologram? {
3
return Hologram.holograms.find { it.id == id }
4
}
5
6
@JvmStatic
7
fun createTextCompoent(
8
initText: String,
9
location: Location,
10
tick: Long = -1,
11
onTick: (HologramComponent) -> Unit = {}
12
): TextHologram {
13
return TextHologram(initText, Position.fromLocation(location), tick, onTick)
14
}
15
16
@JvmStatic
17
fun createItemCompoent(
18
initItem: ItemStack,
19
location: Location,
20
tick: Long = -1,
21
onTick: (HologramComponent) -> Unit = {}
22
): ItemHologram {
23
return ItemHologram(initItem, Position.fromLocation(location), tick, onTick)
24
}
25
26
@JvmStatic
27
fun builder(location: Location): HologramBuilder {
28
return HologramBuilder(location = location)
29
}
Copied!
最近更新 8mo ago
复制链接