From 701ee2bd3ad9c786bb966616e45b6d46b3362a64 Mon Sep 17 00:00:00 2001 From: Äkwav Date: Mon, 24 Oct 2022 16:55:06 +0200 Subject: hotfix purse not allowing more than maxint --- src/main/java/de/torui/coflsky/handlers/EventHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 data = new Command<>(CommandType.updatePurse, purse); + Command data = new Command<>(CommandType.updatePurse, purse); CoflSky.Wrapper.SendMessage(data); } } else if (line.contains("bits")) { -- cgit