diff options
author | Äkwav <ekwav@coflnet.com> | 2022-10-24 16:55:06 +0200 |
---|---|---|
committer | Äkwav <ekwav@coflnet.com> | 2022-10-24 16:55:06 +0200 |
commit | 701ee2bd3ad9c786bb966616e45b6d46b3362a64 (patch) | |
tree | 87745615d203545107ccf376a47d5ab57c0984e2 | |
parent | 050d8da158b6bac386d7bfa43871938afc4d0dca (diff) | |
download | COFL-701ee2bd3ad9c786bb966616e45b6d46b3362a64.tar.gz COFL-701ee2bd3ad9c786bb966616e45b6d46b3362a64.tar.bz2 COFL-701ee2bd3ad9c786bb966616e45b6d46b3362a64.zip |
hotfix purse not allowing more than maxint
-rw-r--r-- | src/main/java/de/torui/coflsky/handlers/EventHandler.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/de/torui/coflsky/handlers/EventHandler.java b/src/main/java/de/torui/coflsky/handlers/EventHandler.java index 0fd51f8..ca3f640 100644 --- a/src/main/java/de/torui/coflsky/handlers/EventHandler.java +++ b/src/main/java/de/torui/coflsky/handlers/EventHandler.java @@ -23,7 +23,7 @@ public class EventHandler { public static boolean isInSkyblock = false; public static boolean isInTheCatacombs = false; - private static int purse = 0; + private static long purse = 0; private static int bits = 0; private static String location = ""; private static String server = ""; @@ -170,7 +170,7 @@ public class EventHandler { } private static void ProcessScoreboard(String line){ if (line.contains("purse") || line.contains("piggy")) { - int purse_ = 0; + long purse_ = 0; try { purse_ = parseInt(line.split(" ")[1].replace(",", "")); } catch (NumberFormatException e) { @@ -178,7 +178,7 @@ public class EventHandler { } if (purse != purse_) { purse = purse_; - Command<Integer> data = new Command<>(CommandType.updatePurse, purse); + Command<Long> data = new Command<>(CommandType.updatePurse, purse); CoflSky.Wrapper.SendMessage(data); } } else if (line.contains("bits")) { |