mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2025-02-16 01:42:20 +01:00
Handle null messages in connect error messages
This commit is contained in:
parent
8a8f6a4659
commit
32917bb10f
@ -80,6 +80,11 @@ public abstract class MixinConnectScreen_1 {
|
||||
return future;
|
||||
}
|
||||
|
||||
@WrapOperation(method = "run", at = @At(value = "INVOKE", target = "Ljava/lang/Exception;getMessage()Ljava/lang/String;", remap = false))
|
||||
private String handleNullExceptionMessage(Exception instance, Operation<String> original) {
|
||||
return instance.getMessage() == null ? "" : original.call(instance);
|
||||
}
|
||||
|
||||
@Redirect(method = "run", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/session/Session;getUsername()Ljava/lang/String;"))
|
||||
private String useClassiCubeUsername(Session instance) {
|
||||
if (this.viaFabricPlus$useClassiCubeAccount) {
|
||||
|
Loading…
Reference in New Issue
Block a user