mirror of
https://github.com/Wurst-Imperium/Wurst7.git
synced 2024-09-20 01:12:13 +02:00
Re-enable chat chain broken disconnect
This commit is contained in:
parent
791be1e54c
commit
b433a00d9d
@ -13,7 +13,6 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import net.minecraft.client.network.PlayerListEntry;
|
||||
@ -42,18 +41,4 @@ public class MessageHandlerMixin
|
||||
if(cir.getReturnValue() != MessageTrustStatus.MODIFIED)
|
||||
cir.setReturnValue(MessageTrustStatus.SECURE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevents the client from disconnecting with "Chat message validation
|
||||
* failure" when it receives an unreportable chat message.
|
||||
*/
|
||||
@Inject(at = @At("HEAD"), method = "disconnect()V", cancellable = true)
|
||||
private void onDisconnect(CallbackInfo ci)
|
||||
{
|
||||
if(!WurstClient.INSTANCE.isEnabled())
|
||||
return;
|
||||
|
||||
if(WurstClient.INSTANCE.getOtfs().noChatReportsOtf.isActive())
|
||||
ci.cancel();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user