Set up support server with Thankful Chest tracking and Eternal Rank
This commit is contained in:
parent
a669ac4105
commit
e85ee39ac5
@ -159,6 +159,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
|
|||||||
int hauntedChestsReceived = 0;
|
int hauntedChestsReceived = 0;
|
||||||
int hauntedChestsOpened = 0;
|
int hauntedChestsOpened = 0;
|
||||||
int trickOrTreatChestsReceived = 0;
|
int trickOrTreatChestsReceived = 0;
|
||||||
|
int thankfulChestsReceived = 0;
|
||||||
|
|
||||||
for (CoinTransactionToken transaction : donor.getCoinTransactions())
|
for (CoinTransactionToken transaction : donor.getCoinTransactions())
|
||||||
{
|
{
|
||||||
@ -269,6 +270,17 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
|
|||||||
trickOrTreatChestsReceived += 1;
|
trickOrTreatChestsReceived += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (transaction.SalesPackageName.startsWith("Thankful Chest"))
|
||||||
|
{
|
||||||
|
if (transaction.Coins == 0 && transaction.Gems == 0)
|
||||||
|
{
|
||||||
|
if (transaction.SalesPackageName.split(" ").length == 3)
|
||||||
|
thankfulChestsReceived += Integer.parseInt(transaction.SalesPackageName.split(" ")[2]);
|
||||||
|
else if (transaction.SalesPackageName.split(" ").length == 2)
|
||||||
|
thankfulChestsReceived += 1;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (transaction.SalesPackageName.startsWith("Valentines Gift"))
|
if (transaction.SalesPackageName.startsWith("Valentines Gift"))
|
||||||
{
|
{
|
||||||
@ -339,6 +351,7 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
|
|||||||
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 + "Trick or Treat Chests Received: " + C.cYellow + trickOrTreatChestsReceived);
|
||||||
|
caller.sendMessage(C.cBlue + "Thankful Chests Received: " + C.cYellow + thankfulChestsReceived);
|
||||||
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);
|
||||||
|
@ -24,6 +24,7 @@ import mineplex.staffServer.salespackage.salespackages.DefaultRank;
|
|||||||
import mineplex.staffServer.salespackage.salespackages.FreedomChest;
|
import mineplex.staffServer.salespackage.salespackages.FreedomChest;
|
||||||
import mineplex.staffServer.salespackage.salespackages.HauntedChest;
|
import mineplex.staffServer.salespackage.salespackages.HauntedChest;
|
||||||
import mineplex.staffServer.salespackage.salespackages.IlluminatedChest;
|
import mineplex.staffServer.salespackage.salespackages.IlluminatedChest;
|
||||||
|
import mineplex.staffServer.salespackage.salespackages.LifetimeEternal;
|
||||||
import mineplex.staffServer.salespackage.salespackages.LifetimeHero;
|
import mineplex.staffServer.salespackage.salespackages.LifetimeHero;
|
||||||
import mineplex.staffServer.salespackage.salespackages.LifetimeLegend;
|
import mineplex.staffServer.salespackage.salespackages.LifetimeLegend;
|
||||||
import mineplex.staffServer.salespackage.salespackages.LifetimeTitan;
|
import mineplex.staffServer.salespackage.salespackages.LifetimeTitan;
|
||||||
@ -35,6 +36,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.ThankfulChest;
|
||||||
import mineplex.staffServer.salespackage.salespackages.TrickOrTreatChest;
|
import mineplex.staffServer.salespackage.salespackages.TrickOrTreatChest;
|
||||||
|
|
||||||
public class SalesPackageManager extends MiniPlugin
|
public class SalesPackageManager extends MiniPlugin
|
||||||
@ -72,6 +74,7 @@ public class SalesPackageManager extends MiniPlugin
|
|||||||
AddSalesPackage(new LifetimeHero(this));
|
AddSalesPackage(new LifetimeHero(this));
|
||||||
AddSalesPackage(new LifetimeLegend(this));
|
AddSalesPackage(new LifetimeLegend(this));
|
||||||
AddSalesPackage(new LifetimeTitan(this));
|
AddSalesPackage(new LifetimeTitan(this));
|
||||||
|
AddSalesPackage(new LifetimeEternal(this));
|
||||||
//AddSalesPackage(new GemHunter(this, 4));
|
//AddSalesPackage(new GemHunter(this, 4));
|
||||||
//AddSalesPackage(new GemHunter(this, 8));
|
//AddSalesPackage(new GemHunter(this, 8));
|
||||||
AddSalesPackage(new ApplyKits(this));
|
AddSalesPackage(new ApplyKits(this));
|
||||||
@ -92,6 +95,7 @@ public class SalesPackageManager extends MiniPlugin
|
|||||||
AddSalesPackage(new OmegaChest(this));
|
AddSalesPackage(new OmegaChest(this));
|
||||||
AddSalesPackage(new HauntedChest(this));
|
AddSalesPackage(new HauntedChest(this));
|
||||||
AddSalesPackage(new TrickOrTreatChest(this));
|
AddSalesPackage(new TrickOrTreatChest(this));
|
||||||
|
AddSalesPackage(new ThankfulChest(this));
|
||||||
|
|
||||||
for (PetType petType : PetType.values())
|
for (PetType petType : PetType.values())
|
||||||
{
|
{
|
||||||
|
@ -0,0 +1,33 @@
|
|||||||
|
package mineplex.staffServer.salespackage.command;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||||
|
|
||||||
|
import mineplex.core.command.CommandBase;
|
||||||
|
import mineplex.core.common.Rank;
|
||||||
|
import mineplex.staffServer.salespackage.SalesPackageManager;
|
||||||
|
|
||||||
|
public class LifetimeEternalCommand extends CommandBase<SalesPackageManager>
|
||||||
|
{
|
||||||
|
public LifetimeEternalCommand(SalesPackageManager plugin)
|
||||||
|
{
|
||||||
|
super(plugin, Rank.MODERATOR, "lifetimeeternal");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void Execute(Player caller, String[] args)
|
||||||
|
{
|
||||||
|
resetCommandCharge(caller);
|
||||||
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales rank " + args[0] + " ETERNAL true"));
|
||||||
|
|
||||||
|
resetCommandCharge(caller);
|
||||||
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales item " + args[0] + " 2 Item Mythical Chest"));
|
||||||
|
|
||||||
|
resetCommandCharge(caller);
|
||||||
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales item " + args[0] + " 2 Item Illuminated Chest"));
|
||||||
|
|
||||||
|
resetCommandCharge(caller);
|
||||||
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales item " + args[0] + " 1 Item Omega Chest"));
|
||||||
|
}
|
||||||
|
}
|
@ -22,6 +22,7 @@ public class Sales extends MultiCommandBase<SalesPackageManager>
|
|||||||
AddCommand(new LifetimeHeroCommand(plugin));
|
AddCommand(new LifetimeHeroCommand(plugin));
|
||||||
AddCommand(new LifetimeLegendCommand(plugin));
|
AddCommand(new LifetimeLegendCommand(plugin));
|
||||||
AddCommand(new LifetimeTitanCommand(plugin));
|
AddCommand(new LifetimeTitanCommand(plugin));
|
||||||
|
AddCommand(new LifetimeEternalCommand(plugin));
|
||||||
AddCommand(new KitsCommand(plugin));
|
AddCommand(new KitsCommand(plugin));
|
||||||
AddCommand(new PowerPlayCommand(plugin));
|
AddCommand(new PowerPlayCommand(plugin));
|
||||||
AddCommand(new PetCommand(plugin));
|
AddCommand(new PetCommand(plugin));
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
package mineplex.staffServer.salespackage.salespackages;
|
||||||
|
|
||||||
|
import mineplex.staffServer.salespackage.SalesPackageManager;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class LifetimeEternal extends SalesPackageBase
|
||||||
|
{
|
||||||
|
public LifetimeEternal(SalesPackageManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "Lifetime Eternal");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void displayToAgent(Player agent, String playerName)
|
||||||
|
{
|
||||||
|
addButton(agent, "/sales rank " + playerName + " ETERNAL true", "Lifetime Eternal.");
|
||||||
|
addButton(agent, "/sales item " + playerName + " 2 Item Mythical Chest", "2 Mythical Chests.");
|
||||||
|
addButton(agent, "/sales item " + playerName + " 2 Item Illuminated Chest", "2 Illuminated Chests.");
|
||||||
|
addButton(agent, "/sales item " + playerName + " 1 Item Omega Chest", "1 Omega Chest.");
|
||||||
|
addButton(agent, "Apply All", "/sales lifetimeeternal " + playerName, "Apply all above.");
|
||||||
|
agent.sendMessage(" ");
|
||||||
|
addBackButton(agent, playerName);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package mineplex.staffServer.salespackage.salespackages;
|
||||||
|
|
||||||
|
import mineplex.staffServer.salespackage.SalesPackageManager;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
public class ThankfulChest extends SalesPackageBase
|
||||||
|
{
|
||||||
|
public ThankfulChest(SalesPackageManager manager)
|
||||||
|
{
|
||||||
|
super(manager, "1 Thankful Chest");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void displayToAgent(Player agent, String playerName)
|
||||||
|
{
|
||||||
|
addButton(agent, "/sales item " + playerName + " 1 Item Thankful Chest", "Give 1 Thankful Chest.");
|
||||||
|
agent.sendMessage(" ");
|
||||||
|
addBackButton(agent, playerName);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user