Track trick or treat chests under a unique name

This commit is contained in:
Sam 2017-10-13 23:38:49 +01:00 committed by cnr
parent 6819771775
commit 4680862825
2 changed files with 23 additions and 1 deletions

View File

@ -48,6 +48,7 @@ import mineplex.staffServer.salespackage.salespackages.SalesPackageBase;
import mineplex.staffServer.salespackage.salespackages.SpringChest; 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.TrickOrTreatChest2017;
import mineplex.staffServer.salespackage.salespackages.TrickOrTreatChest; import mineplex.staffServer.salespackage.salespackages.TrickOrTreatChest;
public class SalesPackageManager extends MiniPlugin public class SalesPackageManager extends MiniPlugin
@ -126,6 +127,7 @@ public class SalesPackageManager extends MiniPlugin
addSalesPackage(new TrickOrTreatChest(this)); addSalesPackage(new TrickOrTreatChest(this));
addSalesPackage(new ThankfulChest(this)); addSalesPackage(new ThankfulChest(this));
addSalesPackage(new HOGChest(this)); addSalesPackage(new HOGChest(this));
addSalesPackage(new TrickOrTreatChest2017(this));
for (PetType petType : PetType.values()) for (PetType petType : PetType.values())
{ {
@ -200,7 +202,7 @@ public class SalesPackageManager extends MiniPlugin
} }
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 || salesPackage instanceof HOGChest) || salesPackage instanceof SpringChest || salesPackage instanceof HOGChest || salesPackage instanceof TrickOrTreatChest2017)
{ {
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 TrickOrTreatChest2017 extends SalesPackageBase
{
public TrickOrTreatChest2017(SalesPackageManager manager)
{
super(manager, "1 Trick or Treat Chest 2017");
}
public void displayToAgent(Player agent, String playerName)
{
addButton(agent, "/sales item " + playerName + " 1 Item Trick or Treat Chest 2017", "Give 1 Trick or Treat Chest 2017.");
agent.sendMessage(" ");
addBackButton(agent, playerName);
}
}