Skip to content

Commit

Permalink
Updated MinecraftAuth API usage
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphiMC committed Dec 25, 2023
1 parent 8d398a1 commit c7f857b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/raphimc/viaproxy/ui/impl/RealmsTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ private void addRealms(final JPanel parent, final AbstractRealmsService realmsSe
SwingUtilities.invokeLater(() -> {
join.setEnabled(true);
join.setText(I18n.get("tab.realms.join"));
if (realmsService instanceof JavaRealmsService javaRealmsService && cause instanceof RealmsResponseException realmsResponseException && realmsResponseException.getRealmsErrorCode() == RealmsResponseException.TOS_NOT_ACCEPTED) {
if (realmsService instanceof JavaRealmsService javaRealmsService && cause instanceof RealmsResponseException realmsResponseException && realmsResponseException.getErrorCode() == RealmsResponseException.TOS_NOT_ACCEPTED) {
final int chosen = JOptionPane.showConfirmDialog(ViaProxy.getUI(), I18n.get("tab.realms.accept_tos", "https://aka.ms/MinecraftRealmsTerms"), "ViaProxy", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (chosen == JOptionPane.YES_OPTION) {
javaRealmsService.acceptTos();
Expand Down

0 comments on commit c7f857b

Please sign in to comment.