Package-level declarations

Properties

Link copied to clipboard
val Location.chunkKey: Long

Gets the chunk key of this location.

Link copied to clipboard
val Location.chunkX: Int

Gets the chunk X coordinate of this location.

Link copied to clipboard
val Location.chunkZ: Int

Gets the chunk Z coordinate of this location.

Functions

Link copied to clipboard
fun Location.dispatcher(plugin: SuspendingPlugin = getCallingSuspendingPlugin()): CoroutineContext

Retrieves the coroutine dispatcher for this location.

fun Entity.dispatcher(plugin: SuspendingPlugin = getCallingSuspendingPlugin()): CoroutineContext

Retrieves the coroutine dispatcher for this entity.

Link copied to clipboard
infix fun Location.distanceSqt(other: Location): Double

Computes the squared distance between this location and another.

Link copied to clipboard
fun forEachPlayer(action: (player: Player) -> Unit)

Iterates over all online players and performs the given action.

Link copied to clipboard
suspend fun forEachPlayerInRegion(action: suspend (player: Player) -> Unit, concurrent: Boolean = false)

Executes a suspendable action on each online player, optionally concurrently.

Link copied to clipboard
fun getCallingPlugin(depth: Int = 1): JavaPlugin

Retrieves the JavaPlugin that called this method.

Link copied to clipboard
fun key(name: String): NamespacedKey

Creates a NamespacedKey using the calling plugin and the given name.

Link copied to clipboard
inline fun <I> ReflectionProxyFactory.reflectionProxy(): I
Link copied to clipboard
fun Player.seesLocation(location: Location): Boolean

Checks if the player can see the specified location.

Link copied to clipboard
fun Player.seesLocation2(location: Location): Boolean

Checks if the player can see the specified location based on chunk visibility.

Link copied to clipboard
fun Iterable<UUID>.toPlayers(): List<@Nullable Player>

Converts an iterable of UUIDs to a list of online Player instances.

fun Sequence<UUID>.toPlayers(): Sequence<@Nullable Player>

Converts a sequence of UUIDs to a sequence of online Player instances.