From de3d8cf0b3177eeee05ecaa3ac2736d759c7d4b9 Mon Sep 17 00:00:00 2001 From: Alexander Meech Date: Sun, 15 Oct 2017 00:20:44 -0700 Subject: [PATCH] Update CustomerSupport.java --- .../customerSupport/CustomerSupport.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java index 610b2bd80..23cd2dce8 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java @@ -175,6 +175,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable int hauntedChestsReceived = 0; int hauntedChestsOpened = 0; int trickOrTreatChestsReceived = 0; + int trickOrTreatChests2017Received = 0; int thankfulChestsReceived = 0; int gingerbreadChestsReceived = 0; int minestrikeChestsReceived = 0; @@ -289,7 +290,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable } } - if (transaction.SalesPackageName.startsWith("Trick or Treat Chest 2017")) + if (transaction.SalesPackageName.startsWith("Trick or Treat Chest")) { if (transaction.Coins == 0 && transaction.Gems == 0) { @@ -299,6 +300,17 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable trickOrTreatChestsReceived += 1; } + } + if (transaction.SalesPackageName.startsWith("Trick or Treat Chest 2017")) + { + if (transaction.Coins == 0 && transaction.Gems == 0) + { + if (transaction.SalesPackageName.split(" ").length == 6) + trickOrTreatChests2017Received += Integer.parseInt(transaction.SalesPackageName.split(" ")[5]); + else if (transaction.SalesPackageName.split(" ").length == 5) + trickOrTreatChests2017Received += 1; + } + } if (transaction.SalesPackageName.startsWith("Thankful Chest")) { @@ -514,6 +526,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable 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 + "Trick or Treat Bags 2017 Received: " + C.cYellow + trickOrTreatChests2017Received); caller.sendMessage(C.cBlue + "Gingerbread Chests Received: " + C.cYellow + gingerbreadChestsReceived + " " + C.cBlue + "Minestrike Chests Received: " + C.cYellow + minestrikeChestsReceived); caller.sendMessage(C.cBlue + "Love Chests Received: " + C.cYellow + loveChestsReceived); caller.sendMessage(C.cBlue + "St Patrick's Chests Received: " + C.cYellow + stPatricksChestReceived); @@ -630,4 +643,4 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable } return C.cRed + C.Bold + "Locked"; } -} \ No newline at end of file +}