Package org.quiltmc.qkl.wrapper.qsl.networking

Types

Link copied to clipboard
typealias EntityTrackingCallback = (trackedEntity: Entity, player: ServerPlayerEntity) -> Unit
Link copied to clipboard
typealias GenericLoginCallback = ServerLoginNetworkHandler.(server: MinecraftServer) -> Unit
Link copied to clipboard
typealias GenericPlayCallback = ServerPlayNetworkHandler.(server: MinecraftServer) -> Unit
Link copied to clipboard
typealias LoginQueryStartCallback = ServerLoginNetworkHandler.(server: MinecraftServer, packetSender: PacketSender, synchronizer: ServerLoginNetworking.LoginSynchronizer) -> Unit
Link copied to clipboard
typealias S2CPlayChannelCallback = ServerPlayNetworkHandler.(packetSender: PacketSender, server: MinecraftServer, channels: List<Identifier>) -> Unit
Link copied to clipboard
typealias S2CPlayReadyCallback = ServerPlayNetworkHandler.(packetSender: PacketSender, server: MinecraftServer) -> Unit

Functions

Link copied to clipboard
fun ServerWorld.getPlayersNear(pos: Vec3d, radius: Double): Collection<ServerPlayerEntity>
fun ServerWorld.getPlayersNear(pos: Vec3i, radius: Double): Collection<ServerPlayerEntity>

Returns the players who are a max of radius blocks away from the pos.

Link copied to clipboard

Returns the players who are currently "tracking" the chunk, i.e. who have the chunk loaded.

Link copied to clipboard
fun EventRegistration.onEntityTrackingStart(callback: EntityTrackingCallback)

Invoked when a player on the server starts tracking an entity. This usually happens when the entity gets close enough to the player to be seen.

Link copied to clipboard
fun EventRegistration.onEntityTrackingStop(callback: EntityTrackingCallback)

Invoked when a player on the server stops tracking an entity. By the time this event runs, the player has already been told to destroy the entity instance, but the entity is still on the server.

Link copied to clipboard
fun EventRegistration.onLoginDisconnect(callback: GenericLoginCallback)
Link copied to clipboard
fun EventRegistration.onLoginInit(callback: GenericLoginCallback)
Link copied to clipboard
fun EventRegistration.onLoginQueryStart(callback: LoginQueryStartCallback)
Link copied to clipboard
fun EventRegistration.onPlayChannelRegister(callback: S2CPlayChannelCallback)
Link copied to clipboard
fun EventRegistration.onPlayChannelUnregister(callback: S2CPlayChannelCallback)
Link copied to clipboard
fun EventRegistration.onPlayDisconnect(callback: GenericPlayCallback)
Link copied to clipboard
fun EventRegistration.onPlayInit(callback: GenericPlayCallback)
Link copied to clipboard
fun EventRegistration.onPlayReady(callback: S2CPlayReadyCallback)

Properties

Link copied to clipboard
val MinecraftServer.allPlayers: Collection<ServerPlayerEntity>

All players currently on the server.

Link copied to clipboard
val ServerWorld.playersInWorld: Collection<ServerPlayerEntity>

All players currently in the world or dimension.

Link copied to clipboard
val Entity.playersTracking: Collection<ServerPlayerEntity>

The players who are currently "tracking" the entity, i.e. who have the entity loaded.

val BlockEntity.playersTracking: Collection<ServerPlayerEntity>

The players who are currently "tracking" the block entity, i.e. who have the block entity loaded.