From 42605310d0a31c0c6e2d848537332147387e383e Mon Sep 17 00:00:00 2001 From: Madis Otenurm Date: Sat, 12 Nov 2022 00:10:13 +0200 Subject: Minor cleanup (#289) * Update Loom, optimize imports * More fixes * Update MixinMinecraft.java--- .../aizistral/nochatreports/debug/UnrealPlayer.java | 19 ------------------- .../nochatreports/debug/mixins/MixinMinecraft.java | 7 ++++++- 2 files changed, 6 insertions(+), 20 deletions(-) (limited to 'src/test') diff --git a/src/test/java/com/aizistral/nochatreports/debug/UnrealPlayer.java b/src/test/java/com/aizistral/nochatreports/debug/UnrealPlayer.java index dd8b3ad..8681ae5 100644 --- a/src/test/java/com/aizistral/nochatreports/debug/UnrealPlayer.java +++ b/src/test/java/com/aizistral/nochatreports/debug/UnrealPlayer.java @@ -1,26 +1,7 @@ package com.aizistral.nochatreports.debug; -import java.time.Instant; -import java.util.Optional; import java.util.UUID; -import javax.annotation.Nullable; - -import com.mojang.authlib.GameProfile; - -import net.minecraft.network.chat.ChatType; -import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.FilterMask; -import net.minecraft.network.chat.LastSeenMessages; -import net.minecraft.network.chat.MessageSignature; -import net.minecraft.network.chat.PlayerChatMessage; -import net.minecraft.network.chat.SignedMessageBody; -import net.minecraft.network.protocol.game.ClientboundPlayerChatPacket; -import net.minecraft.network.protocol.game.ClientboundSystemChatPacket; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.server.network.ServerGamePacketListenerImpl; - /** * Exists solely to help with testing some of the features of the mod. * You can use this to trick client into thinking there is another player diff --git a/src/test/java/com/aizistral/nochatreports/debug/mixins/MixinMinecraft.java b/src/test/java/com/aizistral/nochatreports/debug/mixins/MixinMinecraft.java index de36f8f..34fcf9f 100644 --- a/src/test/java/com/aizistral/nochatreports/debug/mixins/MixinMinecraft.java +++ b/src/test/java/com/aizistral/nochatreports/debug/mixins/MixinMinecraft.java @@ -10,7 +10,12 @@ import net.minecraft.client.Minecraft; @Mixin(Minecraft.class) public class MixinMinecraft { - + /** + * Replaces real ban screen with a fake one for testing. + * @return Fake ban screen + * @reason Testing + * @author Aizistral + */ @Overwrite public BanDetails multiplayerBan() { return NoChatReportsDebug.getFakeBan(); -- cgit v1.2.3