Package-level declarations

Types

Link copied to clipboard

Utility object for dynamically loading NMS classes and creating instances at runtime.

Link copied to clipboard
interface ConnectionHub

Hub interface for managing packet-level connections for players.

Link copied to clipboard
interface EffectBuilder

Builder interface for configuring a generic particle/effect.

Link copied to clipboard

Represents client-side entity animation types sent via packets.

Link copied to clipboard

DSL builder for specifying equipment items for a fake entity.

Link copied to clipboard

DSL builder for specifying fake block changes sent to a player.

Link copied to clipboard

DSL builder for configuring and spawning a client-side fake entity.

Link copied to clipboard
interface MetadataBuilder

DSL builder for constructing entity metadata entries.

Link copied to clipboard

Enumerates all supported entity metadata value types as defined by the Minecraft protocol.

Link copied to clipboard
interface MiscHub

Hub interface for miscellaneous packet-based operations.

Link copied to clipboard
interface NetworkSettings

Configures simulated network conditions for a player's packet pipeline.

Link copied to clipboard

Singleton facade that delegates all PacketHub operations to the version-specific PacketHub implementation loaded at runtime.

Link copied to clipboard
class PacketBuilder(player: Player)

Top-level DSL builder for sending various packet-based effects to a Player.

Link copied to clipboard
annotation class PacketDsl

DSL marker annotation for the packet DSL scope. Prevents implicit receiver leaking.

Link copied to clipboard
class PacketEvent(val player: Player, val packet: Any, var isCancelled: Boolean = false)

Represents a packet event that can be inspected or cancelled during interception.

Link copied to clipboard

Central interface for all packet-level operations.

Link copied to clipboard
interface PacketListener

Provides hooks for intercepting and transforming packets at the Netty pipeline level.

Link copied to clipboard
object Packets : Listener

Central singleton for managing packet interception, player injection, and global packet handlers.

Link copied to clipboard
interface PacketType<T>

Represents a typed packet descriptor with a unique auto-incremented id.

Link copied to clipboard

Predefined PacketType constants for common Bukkit types.

Link copied to clipboard
interface PacketWrapper

Wraps a raw NMS packet object, providing access to the original instance.

Link copied to clipboard
class ParticleBuilder(val type: Particle)

DSL builder for configuring a particle effect.

Link copied to clipboard

DSL builder for configuring a sound packet.

Link copied to clipboard
interface TeamBuilder

Builder interface for configuring a scoreboard team sent via packets.

Link copied to clipboard

DSL builder for configuring a title packet.

Link copied to clipboard

Represents a Minecraft server version in the format major.minor.patch.

Link copied to clipboard

DSL builder for configuring a world border packet.

Functions

Link copied to clipboard
operator fun ClosedRange<Version>.contains(version: String): Boolean

Returns true if the version string falls within this closed range.

operator fun OpenEndRange<Version>.contains(version: String): Boolean

Returns true if the version string falls within this open-ended range.

Link copied to clipboard
fun <T> Any.getFieldValue(fieldName: String): T

Returns the value of the field named fieldName from this object using reflection.

Link copied to clipboard
fun Player.networkSettings(action: NetworkSettings.() -> Unit)

Configures the simulated NetworkSettings for this player.

Link copied to clipboard
inline fun <T : Any> PacketListener.on(noinline action: T.(PacketEvent) -> Unit)

Registers a type-safe handler for both sent and received packets of type T.

Link copied to clipboard
inline fun <T> Player.onPacket(crossinline handler: PacketEvent.(T) -> Unit)

Subscribe to specific packet events for a player.

Link copied to clipboard
inline fun <T> Player.onPacketAsync(crossinline handler: suspend PacketEvent.(T) -> Unit)

Subscribe to specific packet events for a player asynchronously.

Link copied to clipboard
inline fun <T : Any> PacketListener.onReceive(noinline action: T.(PacketEvent) -> Unit)

Registers a type-safe handler for packets of type T received from the client.

Link copied to clipboard
inline fun <T : Any> PacketListener.onSend(noinline action: T.(PacketEvent) -> Unit)

Registers a type-safe handler for packets of type T being sent to the client.

Link copied to clipboard
fun packet(player: Player, action: PacketBuilder.() -> Unit)

Entry point for the packet DSL. Applies action to a PacketBuilder for the given player.

Link copied to clipboard
fun Player.packetAnimation(plugin: Plugin, duration: Int, action: (Int) -> Unit)

Runs a tick-based animation loop for this player for duration ticks, calling action with the current tick index on each tick.

Link copied to clipboard
inline fun <T> Any.packetField(fieldName: String): T

Convenience inline helper for reading a typed field from a packet object.

Link copied to clipboard
fun packetListener(listener: PacketListener.() -> Unit)

Creates and configures a PacketListener using the given DSL block.

Link copied to clipboard
operator fun String.rangeTo(other: String): ClosedRange<Version>

Creates a closed Version range from two version strings.

Link copied to clipboard

Creates an open-ended Version range from two version strings.

Link copied to clipboard
fun Player.sendPacket(packet: Any)

Sends a raw NMS packet to the player via PacketAPI.

Link copied to clipboard
fun Player.sendRawPacket(channel: String, action: ByteBuf.() -> Unit)

Sends a raw plugin-channel packet to this player.

Link copied to clipboard
fun Any.setFieldValue(fieldName: String, value: Any?)

Sets the value of the field named fieldName on this object using reflection.