Skip to content

Commit

Permalink
thuiowand
Browse files Browse the repository at this point in the history
  • Loading branch information
quasar098 committed Dec 27, 2022
1 parent 18195fe commit 68ebef8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void obstaclesCollectData() {
@Property(
type = PropertyType.TEXT,
name = "API Key",
description = "Can also be set using /ve <key>",
description = "Run /api new, then /api get, copy it, and put it here for the mod to work. Note that this is YOUR personal api key, no one else is supposed to see this",
category = "General",
placeholder = "Api key goes here",
protectedText = true
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/quasar/voxylenhanced/VoxylUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
public class VoxylUtils {

public static AsyncHttpClient utilsAsyncClient = new AsyncHttpClient();
public static boolean apiWarningGiven = false;

public abstract static class CallBack<ZArg, TArg> {
public abstract void call(ZArg val, TArg val2);
Expand Down Expand Up @@ -60,6 +61,12 @@ public void onSuccess(int i, Map<String, List<String>> map, String content) {
@Override
public void onFailure(int i, Map<String, List<String>> map, String s) {
if (i == 400) {
if (s.contains("Must provide an API key!")) {
if (!apiWarningGiven) {
informPlayer("You need to put an API key into Voxyl Enhanced mod! Run /ve for more info");
apiWarningGiven = true;
}
}
return;
}
System.out.println("Failure at getStarsFromUUID with code: " + i);
Expand Down

0 comments on commit 68ebef8

Please sign in to comment.