Support server stuff

This commit is contained in:
LCastr0 2017-03-06 17:33:36 -03:00
parent ec5de0ef12
commit 63b4dd1053
3 changed files with 35 additions and 1 deletions

View File

@ -166,6 +166,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
int gingerbreadChestsReceived = 0; int gingerbreadChestsReceived = 0;
int minestrikeChestsReceived = 0; int minestrikeChestsReceived = 0;
int loveChestsReceived = 0; int loveChestsReceived = 0;
int stPatricksChestReceived = 0;
for (CoinTransactionToken transaction : donor.getCoinTransactions()) for (CoinTransactionToken transaction : donor.getCoinTransactions())
{ {
@ -319,6 +320,16 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
loveChestsReceived += 1; loveChestsReceived += 1;
} }
} }
if (transaction.SalesPackageName.startsWith("St Patricks Chest"))
{
if (transaction.Coins == 0 && transaction.Gems == 0)
{
if (transaction.SalesPackageName.split(" ").length == 3)
stPatricksChestReceived += Integer.parseInt(transaction.SalesPackageName.split(" ")[2]);
else if (transaction.SalesPackageName.split(" ").length == 2)
stPatricksChestReceived += 1;
}
}
if (transaction.SalesPackageName.startsWith("Valentines Gift")) if (transaction.SalesPackageName.startsWith("Valentines Gift"))
{ {
if (transaction.Coins == 0 && transaction.Gems == 0) if (transaction.Coins == 0 && transaction.Gems == 0)
@ -391,6 +402,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
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 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); 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 + "Love Chests Received: " + C.cYellow + loveChestsReceived);
caller.sendMessage(C.cBlue + "St Patrick's Chests Received: " + C.cYellow + stPatricksChestReceived);
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 + "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"));

View File

@ -39,6 +39,7 @@ import mineplex.staffServer.salespackage.salespackages.Pet;
import mineplex.staffServer.salespackage.salespackages.PowerPlayClub; import mineplex.staffServer.salespackage.salespackages.PowerPlayClub;
import mineplex.staffServer.salespackage.salespackages.RuneAmplifier; import mineplex.staffServer.salespackage.salespackages.RuneAmplifier;
import mineplex.staffServer.salespackage.salespackages.SalesPackageBase; import mineplex.staffServer.salespackage.salespackages.SalesPackageBase;
import mineplex.staffServer.salespackage.salespackages.StPatricksChest;
import mineplex.staffServer.salespackage.salespackages.ThankfulChest; import mineplex.staffServer.salespackage.salespackages.ThankfulChest;
import mineplex.staffServer.salespackage.salespackages.TrickOrTreatChest; import mineplex.staffServer.salespackage.salespackages.TrickOrTreatChest;
@ -100,6 +101,7 @@ public class SalesPackageManager extends MiniPlugin
AddSalesPackage(new HauntedChest(this)); AddSalesPackage(new HauntedChest(this));
AddSalesPackage(new MinestrikeChest(this)); AddSalesPackage(new MinestrikeChest(this));
AddSalesPackage(new LoveChest(this)); AddSalesPackage(new LoveChest(this));
AddSalesPackage(new StPatricksChest(this));
AddSalesPackage(new TrickOrTreatChest(this)); AddSalesPackage(new TrickOrTreatChest(this));
AddSalesPackage(new ThankfulChest(this)); AddSalesPackage(new ThankfulChest(this));
@ -171,7 +173,7 @@ public class SalesPackageManager extends MiniPlugin
coinBuilder = coinBuilder.extra("[").color("gray").extra(salesPackage.getName()).color("green").click("run_command", "/display " + playerName + " " + salesPackage.getName()).extra("] ").color("gray"); coinBuilder = coinBuilder.extra("[").color("gray").extra(salesPackage.getName()).color("green").click("run_command", "/display " + playerName + " " + salesPackage.getName()).extra("] ").color("gray");
} }
else if (salesPackage instanceof MythicalChest || salesPackage instanceof AncientChest || salesPackage instanceof OldChest || salesPackage instanceof IlluminatedChest || salesPackage instanceof FreedomChest || salesPackage instanceof HauntedChest || salesPackage instanceof TrickOrTreatChest else if (salesPackage instanceof MythicalChest || salesPackage instanceof AncientChest || salesPackage instanceof OldChest || salesPackage instanceof IlluminatedChest || salesPackage instanceof FreedomChest || salesPackage instanceof HauntedChest || salesPackage instanceof TrickOrTreatChest
|| salesPackage instanceof ThankfulChest || salesPackage instanceof GingerbreadChest || salesPackage instanceof MinestrikeChest || salesPackage instanceof LoveChest) || salesPackage instanceof ThankfulChest || salesPackage instanceof GingerbreadChest || salesPackage instanceof MinestrikeChest || salesPackage instanceof LoveChest || salesPackage instanceof StPatricksChest)
{ {
chestBuilder = chestBuilder.extra("[").color("gray").extra(salesPackage.getName()).color("green").click("run_command", "/display " + playerName + " " + salesPackage.getName()).extra("] ").color("gray"); chestBuilder = chestBuilder.extra("[").color("gray").extra(salesPackage.getName()).color("green").click("run_command", "/display " + playerName + " " + salesPackage.getName()).extra("] ").color("gray");
} }

View File

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