fun client(): MinecraftGets the raw Minecraft client instance.
Returns
Minecraft client instance
fun client(): MinecraftGets the raw Minecraft client instance.
Minecraft client instance
fun clientPlayer(): LocalPlayer?Gets the raw client player entity.
client player entity, or null if not in a world or on server
fun clientLevel(): ClientLevel?Gets the raw client level (world).
client level instance, or null if not in a world or on server
fun isClientPaused(): BooleanChecks if the client game is paused.
if the game is paused (e.g., pause menu open), false otherwise
fun isInClientWorld(): BooleanChecks if the client is currently in a world.
if the client has loaded a world, false otherwise
fun clientX(): Double?Gets the client player's X coordinate.
X coordinate, or null if not available
fun clientY(): Double?Gets the client player's Y coordinate.
Y coordinate, or null if not available
fun clientZ(): Double?Gets the client player's Z coordinate.
Z coordinate, or null if not available
fun clientPos(): Vec3?Gets the client player's position as a Vec3.
position vector, or null if any coordinate is unavailable
fun clientYaw(): Float?Gets the client player's yaw rotation.
yaw angle in degrees, or null if not available
fun clientPitch(): Float?Gets the client player's pitch rotation.
pitch angle in degrees, or null if not available
fun clientDimensionId(): String?Gets the client player's current dimension identifier.
dimension ID string (e.g., "minecraft:overworld"), or null if not available
fun clientGameTime(): Long?Gets the client world's current game time.
game time in ticks, or null if not available
fun clearClientOverlay()Clears any active overlay message on the client.
if cleared successfully, false otherwise
fun playClientSound(soundId: String, volume: Float = 1.0f, pitch: Float = 1.0f): BooleanPlays a sound on the client.
| Parameter | Description |
|---|---|
soundId | The sound identifier (e.g., "minecraft:block.note_block.pling") |
volume | The volume (0.0 to 1.0+) |
pitch | The pitch multiplier (0.5 to 2.0) |
if the sound was played successfully, false if the sound ID was invalid
fun playClientSound(soundId: Identifier, volume: Float = 1.0f, pitch: Float = 1.0f): BooleanPlays a sound on the client.
| Parameter | Description |
|---|---|
soundId | The sound identifier (e.g., "minecraft:block.note_block.pling") |
volume | The volume (0.0 to 1.0+) |
pitch | The pitch multiplier (0.5 to 2.0) |
if the sound was played successfully, false if the sound ID was invalid
fun clientTitleTimes(fadeInTicks: Int = 10, stayTicks: Int = 70, fadeOutTicks: Int = 20)Sets the timing for title display.
| Parameter | Description |
|---|---|
fadeInTicks | Ticks for fade-in animation |
stayTicks | Ticks to stay visible |
fadeOutTicks | Ticks for fade-out animation |
if timing was set successfully, false otherwise
fun clearClientTitle()Clears any active title on the client.
if cleared successfully, false otherwise
fun clientFps(): IntGets the client's current FPS (frames per second).
current FPS, or null if not available
fun isClientWindowFocused(): BooleanChecks if the client window is focused.
if the window has focus, false otherwise
fun clientScreenName(): String?Gets the name of the currently open screen.
screen class name, or null if no screen is open
fun isClientInMenu(): BooleanChecks if the client is currently in a menu (not in-game).
if a menu screen is open, false if in-game
fun isClientChatOpen(): BooleanChecks if the chat screen is currently open.
if chat is open, false otherwise