com.skillw.pouvoir.internal.feature.hologram.HologramLine.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Pouvoir Show documentation
Show all versions of Pouvoir Show documentation
Bukkit Script Engine Plugin.
package com.skillw.pouvoir.internal.feature.hologram
import com.skillw.pouvoir.internal.feature.hologram.impl.PouEmptyHoloLine
import org.bukkit.Location
import org.bukkit.entity.Player
class HologramLine(location: Location, line: String, vararg viewers: Player) {
private val holoLine = PouHolo.create(location, line, *viewers) ?: PouEmptyHoloLine()
init {
for (viewer in viewers) {
holoLine.visible(viewer, true)
}
}
constructor(location: Location, line: String, viewers: Set) : this(location, line) {
for (viewer in viewers) {
holoLine.visible(viewer, true)
}
}
fun update(line: String) {
if (!holoLine.isDeleted) {
holoLine.update(line)
}
}
fun teleport(location: Location) {
if (!holoLine.isDeleted) {
holoLine.teleport(location)
}
}
fun delete() {
holoLine.delete()
}
fun destroy() {
holoLine.destroy()
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy