@@ -2,16 +2,12 @@ package com.github.subat0m1c.hatecheaters.modules.skyblock
22
33import com.github.subat0m1c.hatecheaters.utils.networkutils.CheckUpdate
44import com.github.subat0m1c.hatecheaters.utils.toasts.ToastRenderer
5- import me.odinmain.events.impl.PacketEvent
65import me.odinmain.features.Module
76import me.odinmain.features.settings.AlwaysActive
87import me.odinmain.features.settings.Setting.Companion.withDependency
98import me.odinmain.features.settings.impl.BooleanSetting
109import me.odinmain.features.settings.impl.SelectorSetting
1110import me.odinmain.features.settings.impl.StringSetting
12- import me.odinmain.utils.skyblock.modMessage
13- import net.minecraft.network.play.server.S38PacketPlayerListItem
14- import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
1511
1612@AlwaysActive
1713object HateCheatersModule : Module(
@@ -81,43 +77,43 @@ object HateCheatersModule : Module(
8177// //println("sent packet: ${event.packet::class.java.simpleName} with id: ${packetId}: $testString")
8278// }
8379//
84- @SubscribeEvent
85- fun onPacketReceive (event : PacketEvent .Receive ) {
86- val packet = event.packet as ? S38PacketPlayerListItem ? : return
87- modMessage(
88- """
89- Player List Packet:
90- Action: ${packet.action}
91- Entries: ${
92- packet.entries.joinToString(" \n " ) {
93- """
94- {
95- name: ${it?.profile?.name} ,
96- id: ${it?.profile?.id} ,
97- gameMode: ${it?.gameMode} ,
98- ping: ${it?.ping} ,
99- displayName: ${it?.displayName}
100- other: ${
101- it?.profile?.properties?.entries()?.joinToString(" \n " ) { (key, value) ->
102- """
103- {
104- key: $key
105- property: {
106- name: ${value.name}
107- value: ${value.value}
108- sig: ${value.signature}
109- }
110- }
111- """ .trimIndent()
112- }
113- }
114- }
115- """ .trimIndent()
116- }
117- }
118- """ .trimIndent()
119- )
120- }
80+ // @SubscribeEvent
81+ // fun onPacketReceive(event: PacketEvent.Receive) {
82+ // val packet = event.packet as? S38PacketPlayerListItem ?: return
83+ // modMessage(
84+ // """
85+ // Player List Packet:
86+ // Action: ${packet.action}
87+ // Entries: ${
88+ // packet.entries.joinToString("\n") {
89+ // """
90+ // {
91+ // name: ${it?.profile?.name},
92+ // id: ${it?.profile?.id},
93+ // gameMode: ${it?.gameMode},
94+ // ping: ${it?.ping},
95+ // displayName: ${it?.displayName}
96+ // other: ${
97+ // it?.profile?.properties?.entries()?.joinToString("\n") { (key, value) ->
98+ // """
99+ // {
100+ // key: $key
101+ // property: {
102+ // name: ${value.name}
103+ // value: ${value.value}
104+ // sig: ${value.signature}
105+ // }
106+ // }
107+ // """.trimIndent()
108+ // }
109+ // }
110+ // }
111+ // """.trimIndent()
112+ // }
113+ // }
114+ // """.trimIndent()
115+ // )
116+ // }
121117
122118// if (event.packet !is S3BPacketScoreboardObjective && event.packet !is S3CPacketUpdateScore && event.packet !is S3EPacketTeams) return
123119// if (event.packet is S3BPacketScoreboardObjective) {
0 commit comments