mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-05 09:21:32 +01:00
removed debug, fixed MFA impl in ClassiCube
This commit is contained in:
parent
2acf382942
commit
a104c92a7c
@ -54,13 +54,14 @@ public class ViaFabricPlus {
|
||||
// Classic Stuff
|
||||
CustomClassicProtocolExtensions.create();
|
||||
ClassicItemSelectionScreen.create();
|
||||
ChatLengthCalculation.create();
|
||||
ClassicProtocolCommands.create();
|
||||
ClassiCubeAccountHandler.create();
|
||||
|
||||
// Bedrock Stuff
|
||||
BedrockAccountHandler.create();
|
||||
|
||||
// Protocol Translator
|
||||
ChatLengthCalculation.create();
|
||||
new ProtocolHack();
|
||||
|
||||
FinishMinecraftLoadCallback.EVENT.register(() -> {
|
||||
|
@ -63,7 +63,7 @@ public class ClassiCubeAccount {
|
||||
processHandler.handleException(throwable1);
|
||||
return;
|
||||
}
|
||||
if (initialTokenResponse.mfaRequired()) {
|
||||
if (loginResponse.mfaRequired()) {
|
||||
processHandler.handleMfa(this);
|
||||
return;
|
||||
}
|
||||
|
@ -29,10 +29,7 @@ public class ViaFabricPlusClassicMPPassProvider extends ClassicMPPassProvider {
|
||||
|
||||
@Override
|
||||
public String getMpPass(UserConnection user) {
|
||||
if (classiCubeMPPass != null) {
|
||||
System.out.println(classiCubeMPPass);
|
||||
return classiCubeMPPass;
|
||||
}
|
||||
if (classiCubeMPPass != null) return classiCubeMPPass;
|
||||
|
||||
if (MPPassSettings.INSTANCE.useBetaCraftAuthentication.getValue()) {
|
||||
final HandshakeStorage handshakeStorage = user.get(HandshakeStorage.class);
|
||||
|
@ -59,6 +59,7 @@ public class ClassiCubeMFAScreen extends Screen {
|
||||
mfaField.setPlaceholder(Text.literal("MFA"));
|
||||
|
||||
this.addDrawableChild(ButtonWidget.builder(Text.literal("Login"), button -> {
|
||||
status = Text.translatable("classicube.viafabricplus.loading");
|
||||
ClassiCubeAccountHandler.INSTANCE.getAccount().login(new ILoginProcessHandler() {
|
||||
@Override
|
||||
public void handleMfa(ClassiCubeAccount account) {
|
||||
@ -94,7 +95,7 @@ public class ClassiCubeMFAScreen extends Screen {
|
||||
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
|
||||
this.renderBackground(matrices);
|
||||
drawCenteredTextWithShadow(matrices, this.textRenderer, this.title, this.width / 2, 70, 16777215);
|
||||
drawCenteredTextWithShadow(matrices, this.textRenderer, this.status, this.width / 2, 70 + textRenderer.fontHeight, 16777215);
|
||||
drawCenteredTextWithShadow(matrices, this.textRenderer, this.status, this.width / 2, 1, 16777215);
|
||||
super.render(matrices, mouseX, mouseY, delta);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user