Support server update

This commit is contained in:
Shaun Bennett 2016-02-12 05:00:09 -06:00
parent 1e596a6969
commit eca400278c
4 changed files with 38 additions and 2 deletions

View File

@ -106,6 +106,7 @@ public class CustomerSupport extends MiniPlugin
int ancientChestsReceived = 0;
int mythicalChestsReceived = 0;
int winterChestsReceived = 0;
int valentinesGiftsReceived = 0;
for (CoinTransactionToken transaction : donor.getCoinTransactions())
{
@ -160,7 +161,18 @@ public class CustomerSupport extends MiniPlugin
else if (transaction.SalesPackageName.split(" ").length == 2)
winterChestsReceived += 1;
}
}
if (transaction.SalesPackageName.startsWith("Valentines Gift"))
{
if (transaction.Coins == 0 && transaction.Gems == 0)
{
if (transaction.SalesPackageName.split(" ").length == 3)
valentinesGiftsReceived += Integer.parseInt(transaction.SalesPackageName.split(" ")[2]);
else if (transaction.SalesPackageName.split(" ").length == 2)
valentinesGiftsReceived += 1;
}
}
}
@ -169,6 +181,7 @@ public class CustomerSupport extends MiniPlugin
caller.sendMessage(C.cBlue + "Ancient Chests Received : " + C.cYellow + ancientChestsReceived);
caller.sendMessage(C.cBlue + "Mythical Chests Received : " + C.cYellow + mythicalChestsReceived);
caller.sendMessage(C.cBlue + "Winter Chests Received : " + C.cYellow + winterChestsReceived);
caller.sendMessage(C.cBlue + "Valentines Gifts Received : " + C.cYellow + valentinesGiftsReceived);
caller.sendMessage(C.cDGreen + C.Strike + "=============================================");
_salesPackageManager.displaySalesPackages(caller, playerName);

View File

@ -21,12 +21,14 @@ import mineplex.staffServer.salespackage.salespackages.FrostLord;
import mineplex.staffServer.salespackage.salespackages.GemHunter;
import mineplex.staffServer.salespackage.salespackages.LifetimeHero;
import mineplex.staffServer.salespackage.salespackages.LifetimeLegend;
import mineplex.staffServer.salespackage.salespackages.LifetimeTitan;
import mineplex.staffServer.salespackage.salespackages.LifetimeUltra;
import mineplex.staffServer.salespackage.salespackages.MonthlyHero;
import mineplex.staffServer.salespackage.salespackages.MonthlyUltra;
import mineplex.staffServer.salespackage.salespackages.MythicalChest;
import mineplex.staffServer.salespackage.salespackages.SalesPackageBase;
import mineplex.staffServer.salespackage.salespackages.OldChest;
import mineplex.staffServer.salespackage.salespackages.ValentinesGift;
public class SalesPackageManager extends MiniPlugin
{
@ -55,12 +57,14 @@ public class SalesPackageManager extends MiniPlugin
AddSalesPackage(new LifetimeUltra(this));
AddSalesPackage(new LifetimeHero(this));
AddSalesPackage(new LifetimeLegend(this));
AddSalesPackage(new LifetimeTitan(this));
AddSalesPackage(new GemHunter(this, 4));
AddSalesPackage(new GemHunter(this, 8));
AddSalesPackage(new ApplyKits(this));
AddSalesPackage(new OldChest(this));
AddSalesPackage(new AncientChest(this));
AddSalesPackage(new MythicalChest(this));
AddSalesPackage(new ValentinesGift(this));
AddSalesPackage(new FrostLord(this));
AddSalesPackage(new EasterBunny(this));
}

View File

@ -17,7 +17,6 @@ public class LifetimeTitan extends SalesPackageBase
addButton(agent, "/sales item " + playerName + " 1 Molten Snake", "Gives Molten Snake Mount.");
addButton(agent, "/sales item " + playerName + " 1 Elder Guardian Morph", "Gives Elder Guardian Morph.");
addButton(agent, "/sales item " + playerName + " 1 Flame of the Titans", "Gives Titan Particle.");
addButton(agent, "Apply All", "/sales lifetimelegend " + playerName, " Apply all above.");
agent.sendMessage(" ");
addBackButton(agent, playerName);
}

View File

@ -0,0 +1,20 @@
package mineplex.staffServer.salespackage.salespackages;
import mineplex.staffServer.salespackage.SalesPackageManager;
import org.bukkit.entity.Player;
public class ValentinesGift extends SalesPackageBase
{
public ValentinesGift(SalesPackageManager manager)
{
super(manager, "1 Valentines Gift");
}
public void displayToAgent(Player agent, String playerName)
{
addButton(agent, "/sales item " + playerName + " 1 Item Valentines Gift", "Give 1 Valentines Gift.");
agent.sendMessage(" ");
addBackButton(agent, playerName);
}
}