Skip to content

Commit

Permalink
Supress false positives
Browse files Browse the repository at this point in the history
  • Loading branch information
Avanatiker committed Aug 8, 2023
1 parent 8153cc7 commit fe3c6b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ object PacketCommand : ClientCommand(
}

private fun SafeClientEvent.deployPacket(packet: Packet<*>, info: String) {
// bypasses packet cancel :trollepic:
@Suppress("NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS")
connection.networkManager.sendPacket(packet, null)
MessageSendHelper.sendChatMessage("Sent ${TextFormatting.GRAY}${packet.javaClass.name.split(".").lastOrNull()}${TextFormatting.DARK_RED} > ${TextFormatting.GRAY}$info")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ object Freecam : Module(
override fun isInvisibleToPlayer(player: EntityPlayer) = true
}

@Suppress("NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS")
private class NoOpNetHandlerPlayerClient(realNetHandler: NetHandlerPlayClient) : NetHandlerPlayClient(mc, null, realNetHandler.networkManager, realNetHandler.gameProfile) {
override fun sendPacket(packetIn: Packet<*>) {
// no packets from freecam player, thanks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ object Nametags : Module(
}
ContentType.PING -> {
if (entity is EntityOtherPlayerMP) {
@Suppress("UNNECESSARY_SAFE_CALL")
connection.getPlayerInfo(entity.uniqueID)?.responseTime?.let {
TextComponent.TextElement("${it}ms", pingColorGradient.get(it.toFloat()).apply { a = GuiColors.text.a })
}
Expand Down

0 comments on commit fe3c6b1

Please sign in to comment.