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

@ -139,7 +139,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
int ancientChestsReceived = 0;
int mythicalChestsReceived = 0;
int winterChestsReceived = 0;
int illuminatedChestsReceived = 0;
int illuminatedChestsReceived = 0;
int valentinesGiftsReceived = 0;
int boostersReceived = 0;
int freedomChestsReceived = 0;
@ -155,6 +155,8 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
int loveChestsReceived = 0;
int stPatricksChestReceived = 0;
int springChestsReceived = 0;
int clansDyeBoxesReceived = 0;
int clansBuilderBoxesReceived = 0;
for (CoinTransactionToken transaction : donor.getCoinTransactions())
{
@ -211,17 +213,17 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
}
}
if (transaction.SalesPackageName.startsWith("Illuminated Chest"))
{
if (transaction.Coins == 0 && transaction.Gems == 0)
{
if (transaction.SalesPackageName.split(" ").length == 3)
illuminatedChestsReceived += Integer.parseInt(transaction.SalesPackageName.split(" ")[2]);
else if (transaction.SalesPackageName.split(" ").length == 2)
illuminatedChestsReceived += 1;
}
if (transaction.SalesPackageName.startsWith("Illuminated Chest"))
{
if (transaction.Coins == 0 && transaction.Gems == 0)
{
if (transaction.SalesPackageName.split(" ").length == 3)
illuminatedChestsReceived += Integer.parseInt(transaction.SalesPackageName.split(" ")[2]);
else if (transaction.SalesPackageName.split(" ").length == 2)
illuminatedChestsReceived += 1;
}
}
}
if (transaction.SalesPackageName.startsWith("Freedom Treasure"))
{
if (transaction.Coins == 0 && transaction.Gems == 0)
@ -369,6 +371,26 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
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);
@ -392,10 +414,10 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
shards.append(" ");
shards.append(C.cBlue + "Shards: " + C.cYellow + donor.getBalance(GlobalCurrency.TREASURE_SHARD));
caller.sendMessage(shards.toString());
// Strutt20 asked me to remove some stuff from the menu
// Strutt20 asked me to remove some stuff from the menu
caller.sendMessage(C.cBlue + "Old Chests Received: " + C.cYellow + oldChestsReceived + " " + C.cBlue + "Ancient Chests Received: " + C.cYellow + ancientChestsReceived);
caller.sendMessage(C.cBlue + "Mythical Chests Received: " + C.cYellow + mythicalChestsReceived + " " + C.cBlue + "Illuminated Chests Received: " + C.cYellow + illuminatedChestsReceived);
caller.sendMessage(C.cBlue + "Omega Chests Received: " + C.cYellow + omegaChestsReceived);
caller.sendMessage(C.cBlue + "Omega Chests Received: " + C.cYellow + omegaChestsReceived);
caller.sendMessage(C.cBlue + "Haunted Chests Received: " + C.cYellow + hauntedChestsReceived + " " + C.cBlue + "Haunted Chests Opened: " + C.cYellow + hauntedChestsOpened);
caller.sendMessage(C.cBlue + "Trick or Treat Chests Received: " + C.cYellow + trickOrTreatChestsReceived + " " + C.cBlue + "Thankful Chests Received: " + C.cYellow + thankfulChestsReceived);
caller.sendMessage(C.cBlue + "Gingerbread Chests Received: " + C.cYellow + gingerbreadChestsReceived + " " + C.cBlue + "Minestrike Chests Received: " + C.cYellow + minestrikeChestsReceived);
@ -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 + "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 + "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"));
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"));