Skip to content

Commit

Permalink
Disable fly boost on Hypixel for safety.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mixces committed Jun 5, 2024
1 parent 533dcef commit 1e1051e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/org/polyfrost/polysprint/core/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package org.polyfrost.polysprint.core

import cc.polyfrost.oneconfig.libs.universal.UKeyboard
import cc.polyfrost.oneconfig.libs.universal.UScreen
import cc.polyfrost.oneconfig.utils.hypixel.HypixelUtils
import net.minecraft.client.settings.KeyBinding
import org.lwjgl.input.Mouse
import org.polyfrost.polysprint.PolySprint.gameSettings
Expand All @@ -34,7 +35,7 @@ fun shouldSetSneak(keyBinding: KeyBinding): Boolean {
}

fun shouldFlyBoost(): Boolean {
return gameSettings.keyBindSprint.isKeyDown && PolySprintConfig.enabled && PolySprintConfig.toggleFlyBoost && player!!.capabilities.isFlying && player!!.capabilities.isCreativeMode
return gameSettings.keyBindSprint.isKeyDown && PolySprintConfig.enabled && PolySprintConfig.toggleFlyBoost && player!!.capabilities.isFlying && player!!.capabilities.isCreativeMode && !HypixelUtils.INSTANCE.isHypixel
}

fun checkKeyCode(keyCode: Int) = if (keyCode > 0) UKeyboard.isKeyDown(keyCode) else Mouse.isButtonDown(
Expand Down

0 comments on commit 1e1051e

Please sign in to comment.