File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
mod/src/main/kotlin/gg/skytils/skytilsmod/features/impl/misc Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,13 @@ object ScamCheck : EventSubscriber {
5656 if (! Utils .inSkyblock || ! Skytils .config.scamCheck) return
5757 when (val packet = event.packet) {
5858 is S2DPacketOpenWindow -> {
59- if (tradingRegex.matches(packet.windowTitle.unformattedText)) {
59+ val windowTitle =
60+ // #if MC<12000
61+ packet.windowTitle.formattedText
62+ // #else
63+ // $$ packet.name.string
64+ // #endif
65+ if (tradingRegex.matches(windowTitle)) {
6066 tradingWindowId = packet.windowId
6167 scamChecked = false
6268 }
@@ -83,7 +89,10 @@ object ScamCheck : EventSubscriber {
8389 val firstLore = ItemUtil .getItemLore(tradingWith).find { it.matches(tradingWithRegex) } ? : return
8490 val otherParty = firstLore.replace(tradingWithRegex, " $1" )
8591 val worldUUID = mc.theWorld?.playerEntities?.find {
86- it.uniqueID.version() == 4 && it.name == otherParty
92+ it.uniqueID.version() == 4 && otherParty == it.name
93+ // #if MC>=11600
94+ // $$ .string
95+ // #endif
8796 }?.uniqueID
8897 Skytils .IO .launch {
8998 val uuid = worldUUID ? : runCatching { MojangUtil .getUUIDFromUsername(otherParty) }.getOrNull()
You can’t perform that action at this time.
0 commit comments