Added spring chest to cust server
This commit is contained in:
parent
5464a74d2c
commit
8a7f221bc6
@ -167,6 +167,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
|
|||||||
int minestrikeChestsReceived = 0;
|
int minestrikeChestsReceived = 0;
|
||||||
int loveChestsReceived = 0;
|
int loveChestsReceived = 0;
|
||||||
int stPatricksChestReceived = 0;
|
int stPatricksChestReceived = 0;
|
||||||
|
int springChestsReceived = 0;
|
||||||
|
|
||||||
for (CoinTransactionToken transaction : donor.getCoinTransactions())
|
for (CoinTransactionToken transaction : donor.getCoinTransactions())
|
||||||
{
|
{
|
||||||
@ -330,6 +331,16 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
|
|||||||
stPatricksChestReceived += 1;
|
stPatricksChestReceived += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (transaction.SalesPackageName.startsWith("Spring Chest"))
|
||||||
|
{
|
||||||
|
if (transaction.Coins == 0 && transaction.Gems == 0)
|
||||||
|
{
|
||||||
|
if (transaction.SalesPackageName.split(" ").length == 4)
|
||||||
|
springChestsReceived += Integer.parseInt(transaction.SalesPackageName.split(" ")[3]);
|
||||||
|
else if (transaction.SalesPackageName.split(" ").length == 3)
|
||||||
|
springChestsReceived += 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)
|
||||||
|
@ -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.SpringChest;
|
||||||
import mineplex.staffServer.salespackage.salespackages.StPatricksChest;
|
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;
|
||||||
@ -102,6 +103,7 @@ public class SalesPackageManager extends MiniPlugin
|
|||||||
AddSalesPackage(new MinestrikeChest(this));
|
AddSalesPackage(new MinestrikeChest(this));
|
||||||
AddSalesPackage(new LoveChest(this));
|
AddSalesPackage(new LoveChest(this));
|
||||||
AddSalesPackage(new StPatricksChest(this));
|
AddSalesPackage(new StPatricksChest(this));
|
||||||
|
AddSalesPackage(new SpringChest(this));
|
||||||
AddSalesPackage(new TrickOrTreatChest(this));
|
AddSalesPackage(new TrickOrTreatChest(this));
|
||||||
AddSalesPackage(new ThankfulChest(this));
|
AddSalesPackage(new ThankfulChest(this));
|
||||||
|
|
||||||
@ -173,7 +175,8 @@ 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 StPatricksChest)
|
|| salesPackage instanceof ThankfulChest || salesPackage instanceof GingerbreadChest || salesPackage instanceof MinestrikeChest || salesPackage instanceof LoveChest || salesPackage instanceof StPatricksChest
|
||||||
|
|| salesPackage instanceof SpringChest)
|
||||||
{
|
{
|
||||||
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,21 @@
|
|||||||
|
package mineplex.staffServer.salespackage.salespackages;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import mineplex.staffServer.salespackage.SalesPackageManager;
|
||||||
|
|
||||||
|
public class SpringChest extends SalesPackageBase
|
||||||
|
{
|
||||||
|
public SpringChest(SalesPackageManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "1 Spring Chest");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void displayToAgent(Player agent, String playerName)
|
||||||
|
{
|
||||||
|
addButton(agent, "/sales item " + playerName + " 1 Item Spring Chest", "Give 1 Spring Chest.");
|
||||||
|
agent.sendMessage(" ");
|
||||||
|
addBackButton(agent, playerName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user