diff options
author | Äkwav <ekwav@coflnet.com> | 2023-01-29 14:53:12 +0100 |
---|---|---|
committer | Äkwav <ekwav@coflnet.com> | 2023-01-29 14:53:12 +0100 |
commit | 4f7408fd10c24c2ccf9246308c31da83434a90f6 (patch) | |
tree | bb153bf598704f595a56ab37e79099f89c304616 /src/main/java/de/torui/coflsky/handlers | |
parent | 19f6d6eacf3df61c3079d342482df3ae4a2c3e15 (diff) | |
download | COFL-4f7408fd10c24c2ccf9246308c31da83434a90f6.tar.gz COFL-4f7408fd10c24c2ccf9246308c31da83434a90f6.tar.bz2 COFL-4f7408fd10c24c2ccf9246308c31da83434a90f6.zip |
double check purse parsing and update to 1.4.4
Diffstat (limited to 'src/main/java/de/torui/coflsky/handlers')
-rw-r--r-- | src/main/java/de/torui/coflsky/handlers/EventHandler.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/de/torui/coflsky/handlers/EventHandler.java b/src/main/java/de/torui/coflsky/handlers/EventHandler.java index ca3f640..ad25159 100644 --- a/src/main/java/de/torui/coflsky/handlers/EventHandler.java +++ b/src/main/java/de/torui/coflsky/handlers/EventHandler.java @@ -17,14 +17,14 @@ import net.minecraft.util.EnumChatFormatting; import java.util.*; import static de.torui.coflsky.CoflSky.config; -import static java.lang.Integer.parseInt; +import static java.lang.Long.parseLong; public class EventHandler { public static boolean isInSkyblock = false; public static boolean isInTheCatacombs = false; private static long purse = 0; - private static int bits = 0; + private static long bits = 0; private static String location = ""; private static String server = ""; @@ -172,7 +172,7 @@ public class EventHandler { if (line.contains("purse") || line.contains("piggy")) { long purse_ = 0; try { - purse_ = parseInt(line.split(" ")[1].replace(",", "")); + purse_ = parseLong(line.split(" ")[1].replace(",", "")); } catch (NumberFormatException e) { e.printStackTrace(); } @@ -182,15 +182,15 @@ public class EventHandler { CoflSky.Wrapper.SendMessage(data); } } else if (line.contains("bits")) { - int bits_ = 0; + long bits_ = 0; try { - bits_ = parseInt(line.split(" ")[1].replace(",", "")); + bits_ = parseLong(line.split(" ")[1].replace(",", "")); } catch (NumberFormatException e) { e.printStackTrace(); } if (bits != bits_) { bits = bits_; - Command<Integer> data = new Command<>(CommandType.updateBits, bits); + Command<Long> data = new Command<>(CommandType.updateBits, bits); CoflSky.Wrapper.SendMessage(data); } } |