Add HOG Chests to the support server
This commit is contained in:
parent
b692bf1e75
commit
e8b0a1f968
@ -161,6 +161,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
|
||||
int springChestsReceived = 0;
|
||||
int clansDyeBoxesReceived = 0;
|
||||
int clansBuilderBoxesReceived = 0;
|
||||
int hogChestReceived = 0;
|
||||
|
||||
for (CoinTransactionToken transaction : donor.getCoinTransactions())
|
||||
{
|
||||
@ -395,6 +396,16 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
|
||||
clansBuilderBoxesReceived += 1;
|
||||
}
|
||||
}
|
||||
if (transaction.SalesPackageName.startsWith("HOG Chest"))
|
||||
{
|
||||
if (transaction.Coins == 0 && transaction.Gems == 0)
|
||||
{
|
||||
if (transaction.SalesPackageName.split(" ").length == 4)
|
||||
hogChestReceived += Integer.parseInt(transaction.SalesPackageName.split(" ")[3]);
|
||||
else if (transaction.SalesPackageName.split(" ").length == 3)
|
||||
hogChestReceived += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StatsManager statsManager = Managers.get(StatsManager.class);
|
||||
@ -432,6 +443,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
|
||||
caller.sendMessage(C.cBlue + "Spring Chests Received: " + C.cYellow + springChestsReceived);
|
||||
caller.sendMessage(C.cBlue + "Freedom Chests Received: " + C.cYellow + freedomChestsReceived);
|
||||
caller.sendMessage(C.cBlue + "Game Amplifiers Received: " + C.cYellow + boostersReceived);
|
||||
caller.sendMessage(C.cBlue + "HOG Chests Received: " + C.cYellow + hogChestReceived);
|
||||
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 + clansBuilderBoxesReceived);
|
||||
caller.sendMessage(C.cBlue + "Clan Banner Usage: " + getLockedFreedomStr(client.getUniqueId(), "Clan Banner Usage") + " " + C.cBlue + "Clan Banner Editor: " + getLockedFreedomStr(client.getUniqueId(), "Clan Banner Editor"));
|
||||
|
@ -23,6 +23,7 @@ import mineplex.staffServer.salespackage.salespackages.Coins;
|
||||
import mineplex.staffServer.salespackage.salespackages.DefaultRank;
|
||||
import mineplex.staffServer.salespackage.salespackages.FreedomChest;
|
||||
import mineplex.staffServer.salespackage.salespackages.GingerbreadChest;
|
||||
import mineplex.staffServer.salespackage.salespackages.HOGChest;
|
||||
import mineplex.staffServer.salespackage.salespackages.HauntedChest;
|
||||
import mineplex.staffServer.salespackage.salespackages.IlluminatedChest;
|
||||
import mineplex.staffServer.salespackage.salespackages.LifetimeEternal;
|
||||
@ -109,7 +110,8 @@ public class SalesPackageManager extends MiniPlugin
|
||||
AddSalesPackage(new SpringChest(this));
|
||||
AddSalesPackage(new TrickOrTreatChest(this));
|
||||
AddSalesPackage(new ThankfulChest(this));
|
||||
|
||||
AddSalesPackage(new HOGChest(this));
|
||||
|
||||
for (PetType petType : PetType.values())
|
||||
{
|
||||
AddSalesPackage(new Pet(this, petType.getName(), petType));
|
||||
|
@ -0,0 +1,21 @@
|
||||
package mineplex.staffServer.salespackage.salespackages;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import mineplex.staffServer.salespackage.SalesPackageManager;
|
||||
|
||||
public class HOGChest extends SalesPackageBase
|
||||
{
|
||||
public HOGChest(SalesPackageManager manager)
|
||||
{
|
||||
super(manager, "1 HOG Chest");
|
||||
}
|
||||
|
||||
public void displayToAgent(Player agent, String playerName)
|
||||
{
|
||||
addButton(agent, "/sales item " + playerName + " 1 Item HOG Chest", "Give 1 HOG Chest.");
|
||||
agent.sendMessage(" ");
|
||||
addBackButton(agent, playerName);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user