TrHologramAPI

方法

TrHologramAPI.kt
@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)
}

Last updated