Track enjin/support-given clans boxes in CUST-1

This commit is contained in:
Alexander Meech 2017-06-16 18:36:38 -04:00 committed by GitHub
parent 4e8838d99e
commit 10df654e42

View File

@ -155,6 +155,8 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
int loveChestsReceived = 0; int loveChestsReceived = 0;
int stPatricksChestReceived = 0; int stPatricksChestReceived = 0;
int springChestsReceived = 0; int springChestsReceived = 0;
int clansDyeBoxesReceived = 0;
int clansBuilderBoxesReceived = 0;
for (CoinTransactionToken transaction : donor.getCoinTransactions()) for (CoinTransactionToken transaction : donor.getCoinTransactions())
{ {
@ -369,6 +371,26 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
runeAmplifier60 += 1; runeAmplifier60 += 1;
} }
} }
if (transaction.SalesPackageName.startsWith("Clans Dye Box"))
{
if (transaction.Coins == 0 && transaction.Gems == 0)
{
if (transaction.SalesPackageName.split(" ").length == 4)
clansDyeBoxesReceived += Integer.parseInt(transaction.SalesPackageName.split(" ")[3]);
else if (transaction.SalesPackageName.split(" ").length == 3)
clansDyeBoxesReceived += 1;
}
}
if (transaction.SalesPackageName.startsWith("Clans Builder Box"))
{
if (transaction.Coins == 0 && transaction.Gems == 0)
{
if (transaction.SalesPackageName.split(" ").length == 4)
clansBuilderBoxesReceived += Integer.parseInt(transaction.SalesPackageName.split(" ")[3]);
else if (transaction.SalesPackageName.split(" ").length == 3)
clansBuilderBoxesReceived += 1;
}
}
} }
StatsManager statsManager = Managers.get(StatsManager.class); StatsManager statsManager = Managers.get(StatsManager.class);
@ -404,6 +426,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
caller.sendMessage(C.cBlue + "Spring Chests Received: " + C.cYellow + springChestsReceived); caller.sendMessage(C.cBlue + "Spring Chests Received: " + C.cYellow + springChestsReceived);
caller.sendMessage(C.cBlue + "Game Amplifiers Received: " + C.cYellow + boostersReceived); caller.sendMessage(C.cBlue + "Game Amplifiers Received: " + C.cYellow + boostersReceived);
caller.sendMessage(C.cBlue + "Rune Amplifiers (20 min/60 min) Received: " + C.cYellow + runeAmplifier20 + "/" + runeAmplifier60); caller.sendMessage(C.cBlue + "Rune Amplifiers (20 min/60 min) Received: " + C.cYellow + runeAmplifier20 + "/" + runeAmplifier60);
caller.sendMessage(C.cBlue + "Clans Dye Boxes Received: " + C.cYellow + clansDyeBoxesReceived + " " + C.cBlue + "Clans Builder Boxes Received: " + C.cYellow + clansBuilderBoxesReceieved);
caller.sendMessage(C.cBlue + "Clan Banner Usage: " + getLockedFreedomStr(client.getUniqueId(), "Clan Banner Usage") + " " + C.cBlue + "Clan Banner Editor: " + getLockedFreedomStr(client.getUniqueId(), "Clan Banner Editor")); caller.sendMessage(C.cBlue + "Clan Banner Usage: " + getLockedFreedomStr(client.getUniqueId(), "Clan Banner Usage") + " " + C.cBlue + "Clan Banner Editor: " + getLockedFreedomStr(client.getUniqueId(), "Clan Banner Editor"));
YearMonth yearMonth = YearMonth.now(); YearMonth yearMonth = YearMonth.now();
caller.sendMessage(C.cBlue + "Power Play Subscription (" + yearMonth.getMonth().getDisplayName(TextStyle.FULL, Locale.US) + ") " + (powerPlayData.isSubscribed() ? C.cGreen + "Active" : C.cRed + "Inactive")); caller.sendMessage(C.cBlue + "Power Play Subscription (" + yearMonth.getMonth().getDisplayName(TextStyle.FULL, Locale.US) + ") " + (powerPlayData.isSubscribed() ? C.cGreen + "Active" : C.cRed + "Inactive"));