Server

The server is the centre of the API. It provides access to everything, and is the central manager for most of the server.

You can use the server to retrieve information, managers for various aspects of the API, configuration options, status, and players.

Functions

Link copied to clipboard
@ApiStatus.OverrideOnly
@NotNull
abstract fun audiences(): @NotNull MutableIterable<Audience>
Link copied to clipboard
open override fun clearTitle()
Link copied to clipboard
open fun deleteMessage(@NotNull signedMessage: @NotNull SignedMessage)
open override fun deleteMessage(signature: @NotNull SignedMessage.Signature)
Link copied to clipboard
@NotNull
open override fun filterAudience(@NotNull filter: @NotNull Predicate<in Audience>): @NotNull Audience
Link copied to clipboard
open override fun forEachAudience(@NotNull action: @NotNull Consumer<in Audience>)
Link copied to clipboard
@NotNull
open operator fun <T : Any> get(@NotNull pointer: @NotNull Pointer<T>): @NotNull Optional<T>
Link copied to clipboard
@Contract(value = "_, null -> _; _, !null -> !null")
@Nullable
open fun <T : Any> getOrDefault(@NotNull pointer: @NotNull Pointer<T>, @Nullable defaultValue: @Nullable T?): @Nullable T?
Link copied to clipboard
open fun <T : Any> getOrDefaultFrom(@NotNull pointer: @NotNull Pointer<T>, @NotNull defaultValue: @NotNull Supplier<out T>): @UnknownNullability T
Link copied to clipboard
abstract fun getPlayer(uuid: UUID): Player?

Gets the online player with the given uuid, or returns null if there is no player online with the given uuid.

abstract fun getPlayer(name: String): Player?

Gets the online player with the given name, or returns null if there is no player online with the given name.

Link copied to clipboard
open override fun hideBossBar(@NotNull bar: @NotNull BossBar)
Link copied to clipboard
open fun openBook(book: @NotNull Book.Builder)
open override fun openBook(@NotNull book: @NotNull Book)
Link copied to clipboard
open override fun playSound(@NotNull sound: @NotNull Sound)
open override fun playSound(@NotNull sound: @NotNull Sound, emitter: @NotNull Sound.Emitter)
open override fun playSound(@NotNull sound: @NotNull Sound, x: Double, y: Double, z: Double)
Link copied to clipboard
@NotNull
open override fun pointers(): @NotNull Pointers
Link copied to clipboard
open override fun resetTitle()
Link copied to clipboard
open fun sendActionBar(@NotNull message: @NotNull ComponentLike)
open override fun sendActionBar(@NotNull message: @NotNull Component)
Link copied to clipboard
open fun sendMessage(@NotNull message: @NotNull ComponentLike)
open fun sendMessage(@NotNull source: @NotNull Identified, @NotNull message: @NotNull Component)
open fun sendMessage(@NotNull source: @NotNull Identified, @NotNull message: @NotNull ComponentLike)
open fun sendMessage(@NotNull source: @NotNull Identity, @NotNull message: @NotNull Component)
open fun sendMessage(@NotNull source: @NotNull Identity, @NotNull message: @NotNull ComponentLike)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull message: @NotNull Component, @NotNull type: @NotNull MessageType)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull message: @NotNull ComponentLike, @NotNull type: @NotNull MessageType)
open fun sendMessage(@NotNull message: @NotNull ComponentLike, boundChatType: @NotNull ChatType.Bound)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull source: @NotNull Identified, @NotNull message: @NotNull ComponentLike, @NotNull type: @NotNull MessageType)
@ApiStatus.ScheduledForRemoval(inVersion = "5.0.0")
open fun sendMessage(@NotNull source: @NotNull Identity, @NotNull message: @NotNull ComponentLike, @NotNull type: @NotNull MessageType)
open override fun sendMessage(@NotNull message: @NotNull Component)
open override fun sendMessage(@NotNull signedMessage: @NotNull SignedMessage, boundChatType: @NotNull ChatType.Bound)
open override fun sendMessage(@NotNull message: @NotNull Component, boundChatType: @NotNull ChatType.Bound)
open override fun sendMessage(@NotNull source: @NotNull Identified, @NotNull message: @NotNull Component, @NotNull type: @NotNull MessageType)
open override fun sendMessage(@NotNull source: @NotNull Identity, @NotNull message: @NotNull Component, @NotNull type: @NotNull MessageType)
Link copied to clipboard
open fun sendPlayerListFooter(@NotNull footer: @NotNull ComponentLike)
open override fun sendPlayerListFooter(@NotNull footer: @NotNull Component)
Link copied to clipboard
open fun sendPlayerListHeader(@NotNull header: @NotNull ComponentLike)
open override fun sendPlayerListHeader(@NotNull header: @NotNull Component)
Link copied to clipboard
open fun sendPlayerListHeaderAndFooter(@NotNull header: @NotNull ComponentLike, @NotNull footer: @NotNull ComponentLike)
open override fun sendPlayerListHeaderAndFooter(@NotNull header: @NotNull Component, @NotNull footer: @NotNull Component)
Link copied to clipboard
open override fun <T : Any> sendTitlePart(@NotNull part: @NotNull TitlePart<T>, @NotNull value: @NotNull T)
Link copied to clipboard
open override fun showBossBar(@NotNull bar: @NotNull BossBar)
Link copied to clipboard
open fun showTitle(@NotNull title: @NotNull Title)
Link copied to clipboard
open fun stopSound(@NotNull sound: @NotNull Sound)
open override fun stopSound(@NotNull stop: @NotNull SoundStop)

Properties

Link copied to clipboard

The command manager for this server.

Link copied to clipboard
abstract val config: ServerConfig

The configuration for the server.

Link copied to clipboard
abstract val console: ConsoleSender

The console's Sender object.

Link copied to clipboard

The global event node for the server.

Link copied to clipboard

The factory provider for this server.

Link copied to clipboard
abstract val platform: Platform

Information about this server implementation.

Link copied to clipboard
abstract val players: Collection<Player>

The list of online players.

Link copied to clipboard

The plugin manager for this server.

Link copied to clipboard

The global registry holder for the server.

Link copied to clipboard
abstract val scheduler: Scheduler

The scheduler for this server.

Link copied to clipboard

The services manager for this server.

Link copied to clipboard
abstract val userManager: UserManager

The user manager for this server.

Link copied to clipboard

The world manager for this server.