Skip to content
On this page
Common

ClientPostEffectServerApi

top.katton.apicommon/src/main/kotlin/top/katton/api/ClientPostEffectServerApi.kt
Ask one Fabric or NeoForge client to activate a registered post effect.

setPlayerPostEffect ​

setPlayerPostEffectCommonFunction
kotlin
fun setPlayerPostEffect(player: ServerPlayer, id: Identifier)

Ask one Fabric or NeoForge client to activate a registered post effect.

The client must register [id] before this packet arrives. Paper has no Katton client, so this function has no visible effect there.

setPlayerPostEffect ​

setPlayerPostEffectCommonFunction
kotlin
fun setPlayerPostEffect(player: ServerPlayer, id: String): Boolean

String-id overload of [setPlayerPostEffect]. Returns false when [id] is invalid.

setAllPlayersPostEffect ​

setAllPlayersPostEffectCommonFunction
kotlin
fun setAllPlayersPostEffect(id: Identifier)

Ask every connected Fabric or NeoForge client to activate [id].

setAllPlayersPostEffect ​

setAllPlayersPostEffectCommonFunction
kotlin
fun setAllPlayersPostEffect(id: String): Boolean

String-id overload of [setAllPlayersPostEffect]. Returns false when [id] is invalid.

clearPlayerPostEffect ​

clearPlayerPostEffectCommonFunction
kotlin
fun clearPlayerPostEffect(player: ServerPlayer)

Ask one client to clear its active Katton post effect.

clearAllPlayersPostEffect ​

clearAllPlayersPostEffectCommonFunction
kotlin
fun clearAllPlayersPostEffect()

Ask every connected client to clear its active Katton post effect.

togglePlayerPostEffect ​

togglePlayerPostEffectCommonFunction
kotlin
fun togglePlayerPostEffect(player: ServerPlayer)

Ask one client to toggle its current Katton post effect.

toggleAllPlayersPostEffect ​

toggleAllPlayersPostEffectCommonFunction
kotlin
fun toggleAllPlayersPostEffect()

Ask every connected client to toggle its current Katton post effect.