From 716bd018eabfaf5a8bda543ca1357d8fb2f0ee94 Mon Sep 17 00:00:00 2001 From: udu3324 <47045986+udu3324@users.noreply.github.com> Date: Sun, 5 Feb 2023 23:19:20 -0600 Subject: [PATCH] fix nickalert? i think --- README.md | 10 +++++----- .../com/udu3324/hytools/tools/nickalert/NickAlert.java | 8 ++------ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index a65453a..6019566 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,9 @@ A mod that has useful tools for Hypixel. Credit to the modding community for hel **PartyGuess** -A tool that looks at chat and guesses players that are in a party. PartyGuess also checks if the first player in that party is in a guild with anyone else in the party. This tool works about **90%** of the time. This could fail if Hypixel decides to join everyone at the same time. +A tool that looks at chat and guesses players that are in a party. PartyGuess also checks if the first player in that party is in a guild with anyone else in the party. This tool works about **60%** of the time. This could fail if Hypixel decides to join everyone at the same time. -![](https://media.discordapp.net/attachments/956773599644090379/1004244515642671115/unknown.png) +![](https://cdn.modrinth.com/data/rZiwXEaU/images/e9f8f5f64e52005d750cb5a027153ee9f48d374b.png) @@ -43,9 +43,9 @@ A tool that looks at chat and guesses players that are in a party. PartyGuess al A tool that alerts if someone joined is nicked. This tool **will not reveal the person** behind the nick, but will just alert it in chat. This tool will half of the time. (uses mc api to check if username exists) You can enable NickAlertHypixelAPI to get more accuracy. (using hypixel api for nickalert is in the gray zone of being allowed. use at your own risk) -![](https://cdn.discordapp.com/attachments/956773599644090379/1004244058262220880/unknown.png) +![](https://cdn.modrinth.com/data/rZiwXEaU/images/f5c311380dc62310d54e8c606d3f4c4f318b3b36.png) -![](https://media.discordapp.net/attachments/956773599644090379/964672960873000980/unknown.png) +![](https://cdn.modrinth.com/data/rZiwXEaU/images/6e247ac4e93bafe5e0bb3d451a28cb315e098f62.png) ## Translations @@ -66,7 +66,7 @@ Go to your mods folder (.minecraft/mods) and drag Hytools-#.#.#.jar into it. Tad Here are the commands you can use to turn certain tools on and off with: -![](https://cdn.discordapp.com/attachments/919010475679825960/1003739858184974416/unknown.png) +![](https://cdn.modrinth.com/data/rZiwXEaU/images/6378dff5bddba6d46a6b1536333a7dba8fcdff36.png) diff --git a/src/main/java/com/udu3324/hytools/tools/nickalert/NickAlert.java b/src/main/java/com/udu3324/hytools/tools/nickalert/NickAlert.java index a03229c..9196784 100644 --- a/src/main/java/com/udu3324/hytools/tools/nickalert/NickAlert.java +++ b/src/main/java/com/udu3324/hytools/tools/nickalert/NickAlert.java @@ -36,7 +36,6 @@ public static void run(String username) { // check if user has logged on before if (HypixelApiKey.apiKeySet) { - boolean joinedHypixel = true; URL obj = new URL("https://api.hypixel.net/player?key=" + Config.getStoredAPIKey() + "&uuid=" + uuid); @@ -51,7 +50,6 @@ public static void run(String username) { if (responseCode == 403) { Hytools.log.info("NickAlert.java | Not a valid API key!"); Hytools.sendMessage(I18n.format("nickalert.error")); - joinedHypixel = true; return; } @@ -60,11 +58,9 @@ public static void run(String username) { in.close(); // if it contains the string below, the player hasn't joined hypixel before - joinedHypixel = bR.equals("{\"success\":true,\"player\":null}"); - // if it returns anything else, the player has joined before - - if (!joinedHypixel) + if (bR.equals("{\"success\":true,\"player\":null}")) Hytools.sendMessage("\u00A75" + username + " " + I18n.format("nickalert.isnicknamed")); + } else { Hytools.log.info("NickAlert.java | Not a valid API key!"); Hytools.sendMessage(I18n.format("nickalert.error1"));