Kick module

Kick: Minecraft 26.3 cheat module, full source for every implementation (1 client: LiquidBounce (Kotlin)).

1 implementationEXPLOIT

Clients with this module

Full module source: 1 implementation

Every implementation below is the complete module file, verbatim. Expand a client to read its code.

LiquidBounce (Kotlin)EXPLOITsrc/main/kotlin/net/ccbluex/liquidbounce/features/module/modules/exploit/ModuleKick.ktKotlin · 97 lines · 3.3 KB

Kicks yourself from the server.

SettingsMode
ModuleKick.ktKotlin · Minecraft 26.2 · 97 lines · 3.3 KB · complete file, verbatimOriginal ↗
1
/*
2
 * This file is part of LiquidBounce (https://github.com/CCBlueX/LiquidBounce)
3
 *
4
 * Copyright (c) 2015 - 2026 CCBlueX
5
 *
6
 * LiquidBounce is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * LiquidBounce is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with LiquidBounce. If not, see <https://www.gnu.org/licenses/>.
18
 */
19
package net.ccbluex.liquidbounce.features.module.modules.exploit
20
21
import net.ccbluex.liquidbounce.config.types.list.Tagged
22
import net.ccbluex.liquidbounce.features.module.ClientModule
23
import net.ccbluex.liquidbounce.features.module.ModuleCategories
24
import net.ccbluex.liquidbounce.utils.client.chat
25
import net.ccbluex.liquidbounce.utils.client.markAsError
26
import net.ccbluex.liquidbounce.utils.network.sendHeldItemChange
27
import net.ccbluex.liquidbounce.utils.text.PlainText
28
import net.minecraft.network.protocol.game.ServerboundAttackPacket
29
import net.minecraft.network.protocol.game.ServerboundInteractPacket
30
import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket
31
import net.minecraft.world.InteractionHand
32
import net.minecraft.world.phys.Vec3
33
import kotlin.random.Random
34
35
/**
36
 * Kick module
37
 *
38
 * Kick yourself from the server.
39
 */
40
object ModuleKick : ClientModule("Kick", ModuleCategories.EXPLOIT, disableActivation = true) {
41
42
    init {
43
        doNotIncludeAlways()
44
    }
45
46
    private val mode by enumChoice("Mode", KickModeEnum.QUIT)
47
48
    override fun onEnabled() {
49
        if (mc.hasSingleplayerServer()) {
50
            chat(markAsError(message("cantEnableInSingleplayer")))
51
            return
52
        }
53
54
        kick(mode)
55
    }
56
57
    /**
58
     * Kick client player
59
     *
60
     * @warning Only use on multiplayer! This function can cause the game to crash when used on an integrated server.
61
     */
62
    fun kick(mode: KickModeEnum) = mode.run()
63
64
    @Suppress("unused")
65
    enum class KickModeEnum(override val tag: String, val run: () -> Unit) : Tagged {
66
        QUIT("Quit", {
67
            world.disconnect(PlainText.EMPTY)
68
        }),
69
        INVALID_PACKET("InvalidPacket", {
70
            network.send(
71
                ServerboundMovePlayerPacket.Pos(
72
                    Double.NaN,
73
                    Double.NEGATIVE_INFINITY,
74
                    Double.POSITIVE_INFINITY,
75
                    !player.onGround(),
76
                    !player.horizontalCollision
77
                )
78
            )
79
        }),
80
        SELF_HURT("SelfHurt", {
81
            network.send(ServerboundAttackPacket(player.id))
82
        }),
83
        ILLEGAL_CHAT("IllegalChat", {
84
            network.sendChat("§${Random.nextInt()}§${Random.nextInt()}§")
85
        }),
86
        ILLEGAL_SWTTCHITEM("IllegalSwitchitem", {
87
            network.sendHeldItemChange(-1)
88
        }),
89
        ILLEGAL_INTERACT("IllegalInteract", {
90
            network.send(
91
                ServerboundInteractPacket(player.id, InteractionHand.MAIN_HAND, Vec3.ZERO, player.isShiftKeyDown)
92
            )
93
        }),
94
    }
95
96
}
97