aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal002@users.noreply.github.com>2022-11-01 23:16:54 +0100
committerGitHub <noreply@github.com>2022-11-01 23:16:54 +0100
commit797b858e27c5e3c502e35f8fca74ee06f31e04a7 (patch)
tree24433270a0978588763878843e77dc10f9945062 /src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java
parente42dd2aa0a2e0a988e820e1ceb13cf2bc30ba987 (diff)
downloadnotenoughupdates-797b858e27c5e3c502e35f8fca74ee06f31e04a7.tar.gz
notenoughupdates-797b858e27c5e3c502e35f8fca74ee06f31e04a7.tar.bz2
notenoughupdates-797b858e27c5e3c502e35f8fca74ee06f31e04a7.zip
Prevents wrong coopadd commands (#412)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java
index 0b33609d..e47b03df 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/mixins/MixinNetHandlerPlayClient.java
@@ -19,6 +19,7 @@
package io.github.moulberry.notenoughupdates.mixins;
+import io.github.moulberry.notenoughupdates.miscfeatures.AntiCoopAdd;
import io.github.moulberry.notenoughupdates.miscfeatures.CrystalWishingCompassSolver;
import io.github.moulberry.notenoughupdates.miscfeatures.CustomItemEffects;
import io.github.moulberry.notenoughupdates.miscfeatures.EnchantingSolvers;
@@ -133,6 +134,9 @@ public class MixinNetHandlerPlayClient {
}
if (packet instanceof C01PacketChatMessage) {
NewApiKeyHelper.getInstance().hookPacketChatMessage((C01PacketChatMessage) packet);
+ if (AntiCoopAdd.getInstance().onPacketChatMessage((C01PacketChatMessage) packet)) {
+ ci.cancel();
+ }
}
}