aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java12
-rw-r--r--src/main/kotlin/io/github/moulberry/notenoughupdates/util/UrsaClient.kt2
2 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
index 8b5badca..ba42834c 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java
@@ -460,7 +460,17 @@ public class GuiProfileViewer extends GuiScreen {
long timeDiff = System.currentTimeMillis() - startTime;
val authState = NotEnoughUpdates.INSTANCE.manager.ursaClient.getAuthenticationState();
- if (authState == UrsaClient.AuthenticationState.FAILED_TO_JOINSERVER) {
+ if (NotEnoughUpdates.INSTANCE.manager.ursaClient.hasNonStandardUrsa()) {
+ Utils.drawStringCentered(
+ EnumChatFormatting.RED +
+ "Looks like you are using a non standard NEU server.",
+ guiLeft + sizeX / 2f, guiTop + 111, true, 0
+ );
+ Utils.drawStringCentered(
+ "§cPlease change your ursa server to the default (empty value) in §a/neu ursa§c.",
+ guiLeft + sizeX / 2f, guiTop + 121, true, 0
+ );
+ } else if (authState == UrsaClient.AuthenticationState.FAILED_TO_JOINSERVER) {
Utils.drawStringCentered(
EnumChatFormatting.RED +
"Looks like we cannot authenticate with Mojang.",
diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/util/UrsaClient.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/util/UrsaClient.kt
index 67df5bf9..4a6bc0e1 100644
--- a/src/main/kotlin/io/github/moulberry/notenoughupdates/util/UrsaClient.kt
+++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/util/UrsaClient.kt
@@ -62,6 +62,8 @@ class UrsaClient(val apiUtil: ApiUtil) {
get() = NotEnoughUpdates.INSTANCE.config.apiData.ursaApi.removeSuffix("/").takeIf { it.isNotBlank() }
?: "https://ursa.notenoughupdates.org"
+ fun hasNonStandardUrsa() = ursaRoot != "https://ursa.notenoughupdates.org"
+
private suspend fun authorizeRequest(usedUrsaRoot: String, connection: ApiUtil.Request, t: Token?) {
if (t != null && t.obtainedFrom == usedUrsaRoot) {
logger.log("Authorizing request using token")