Implement trick or treat chest in customer support server
This commit is contained in:
parent
44e016f272
commit
ab228fb492
@ -158,6 +158,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
|
|||||||
int omegaChestsReceived = 0;
|
int omegaChestsReceived = 0;
|
||||||
int hauntedChestsReceived = 0;
|
int hauntedChestsReceived = 0;
|
||||||
int hauntedChestsOpened = 0;
|
int hauntedChestsOpened = 0;
|
||||||
|
int trickOrTreatChestsReceived = 0;
|
||||||
|
|
||||||
for (CoinTransactionToken transaction : donor.getCoinTransactions())
|
for (CoinTransactionToken transaction : donor.getCoinTransactions())
|
||||||
{
|
{
|
||||||
@ -257,6 +258,17 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
|
|||||||
hauntedChestsReceived += 1;
|
hauntedChestsReceived += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (transaction.SalesPackageName.startsWith("Trick or Treat Chest"))
|
||||||
|
{
|
||||||
|
if (transaction.Coins == 0 && transaction.Gems == 0)
|
||||||
|
{
|
||||||
|
if (transaction.SalesPackageName.split(" ").length == 3)
|
||||||
|
trickOrTreatChestsReceived += Integer.parseInt(transaction.SalesPackageName.split(" ")[2]);
|
||||||
|
else if (transaction.SalesPackageName.split(" ").length == 2)
|
||||||
|
trickOrTreatChestsReceived += 1;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (transaction.SalesPackageName.startsWith("Valentines Gift"))
|
if (transaction.SalesPackageName.startsWith("Valentines Gift"))
|
||||||
{
|
{
|
||||||
@ -326,6 +338,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
|
|||||||
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);
|
caller.sendMessage(C.cBlue + "Haunted Chests Received: " + C.cYellow + hauntedChestsReceived);
|
||||||
caller.sendMessage(C.cBlue + "Haunted Chests Opened: " + C.cYellow + hauntedChestsOpened);
|
caller.sendMessage(C.cBlue + "Haunted Chests Opened: " + C.cYellow + hauntedChestsOpened);
|
||||||
|
caller.sendMessage(C.cBlue + "Trick or Treat Chests Received: " + C.cYellow + trickOrTreatChestsReceived);
|
||||||
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) Received: " + C.cYellow + runeAmplifier20);
|
caller.sendMessage(C.cBlue + "Rune Amplifiers (20 min) Received: " + C.cYellow + runeAmplifier20);
|
||||||
caller.sendMessage(C.cBlue + "Rune Amplifiers (60 min) Received: " + C.cYellow + runeAmplifier60);
|
caller.sendMessage(C.cBlue + "Rune Amplifiers (60 min) Received: " + C.cYellow + runeAmplifier60);
|
||||||
|
@ -35,6 +35,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.TrickOrTreatChest;
|
||||||
|
|
||||||
public class SalesPackageManager extends MiniPlugin
|
public class SalesPackageManager extends MiniPlugin
|
||||||
{
|
{
|
||||||
@ -92,6 +93,7 @@ public class SalesPackageManager extends MiniPlugin
|
|||||||
AddSalesPackage(new PowerPlayClub(this, true));
|
AddSalesPackage(new PowerPlayClub(this, true));
|
||||||
AddSalesPackage(new OmegaChest(this));
|
AddSalesPackage(new OmegaChest(this));
|
||||||
AddSalesPackage(new HauntedChest(this));
|
AddSalesPackage(new HauntedChest(this));
|
||||||
|
AddSalesPackage(new TrickOrTreatChest(this));
|
||||||
|
|
||||||
for (mineplex.core.pet.Pet pet : _petFactory.GetPets())
|
for (mineplex.core.pet.Pet pet : _petFactory.GetPets())
|
||||||
{
|
{
|
||||||
@ -165,7 +167,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)
|
else if (salesPackage instanceof MythicalChest || salesPackage instanceof AncientChest || salesPackage instanceof OldChest || salesPackage instanceof IlluminatedChest || salesPackage instanceof FreedomChest || salesPackage instanceof HauntedChest || salesPackage instanceof TrickOrTreatChest)
|
||||||
{
|
{
|
||||||
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");
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,19 @@
|
|||||||
|
package mineplex.staffServer.salespackage.salespackages;
|
||||||
|
|
||||||
|
import mineplex.staffServer.salespackage.SalesPackageManager;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class TrickOrTreatChest extends SalesPackageBase
|
||||||
|
{
|
||||||
|
public TrickOrTreatChest(SalesPackageManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "1 Trick or Treat Chest");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void displayToAgent(Player agent, String playerName)
|
||||||
|
{
|
||||||
|
addButton(agent, "/sales item " + playerName + " 1 Item Trick or Treat Chest", "Give 1 Trick or Treat Chest.");
|
||||||
|
agent.sendMessage(" ");
|
||||||
|
addBackButton(agent, playerName);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user