use of cc.hyperium.event.network.server.hypixel.HypixelGetCoinsEvent in project Hyperium by HyperiumClient.
the class GeneralStatisticsTracking method onChat.
@InvokeEvent
public void onChat(ChatEvent event) {
// Check how much the time has changed since the last use.
checkTimes();
String line = event.getChat().getUnformattedText();
if (line.startsWith("+") && line.contains("coins")) {
int coins = Integer.parseInt(line.split("\\+")[1].split(" coins")[0]);
// Increment coin counters.
EventBus.INSTANCE.post(new HypixelGetCoinsEvent(coins));
lifetimeCoins += coins;
monthlyCoins += coins;
dailyCoins += coins;
}
}
Aggregations