Fix StaffServer rank issues
This commit is contained in:
parent
05a7d8d93e
commit
acae54f021
@ -18,7 +18,7 @@ public class LifetimeEternalCommand extends CommandBase<SalesPackageManager>
|
|||||||
public void Execute(Player caller, String[] args)
|
public void Execute(Player caller, String[] args)
|
||||||
{
|
{
|
||||||
resetCommandCharge(caller);
|
resetCommandCharge(caller);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales rank " + args[0] + " ETERNAL true"));
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales rank " + args[0] + " ETERNAL"));
|
||||||
|
|
||||||
resetCommandCharge(caller);
|
resetCommandCharge(caller);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales item " + args[0] + " 2 Item Mythical Chest"));
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales item " + args[0] + " 2 Item Mythical Chest"));
|
||||||
|
@ -18,7 +18,7 @@ public class LifetimeHeroCommand extends CommandBase<SalesPackageManager>
|
|||||||
public void Execute(Player caller, String[] args)
|
public void Execute(Player caller, String[] args)
|
||||||
{
|
{
|
||||||
resetCommandCharge(caller);
|
resetCommandCharge(caller);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales rank " + args[0] + " HERO true"));
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales rank " + args[0] + " HERO"));
|
||||||
|
|
||||||
resetCommandCharge(caller);
|
resetCommandCharge(caller);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales item " + args[0] + " 2 Item Mythical Chest"));
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales item " + args[0] + " 2 Item Mythical Chest"));
|
||||||
|
@ -18,7 +18,7 @@ public class LifetimeLegendCommand extends CommandBase<SalesPackageManager>
|
|||||||
public void Execute(Player caller, String[] args)
|
public void Execute(Player caller, String[] args)
|
||||||
{
|
{
|
||||||
resetCommandCharge(caller);
|
resetCommandCharge(caller);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales rank " + args[0] + " LEGEND true"));
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales rank " + args[0] + " LEGEND"));
|
||||||
|
|
||||||
resetCommandCharge(caller);
|
resetCommandCharge(caller);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales item " + args[0] + " 3 Item Mythical Chest"));
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales item " + args[0] + " 3 Item Mythical Chest"));
|
||||||
|
@ -18,7 +18,7 @@ public class LifetimeTitanCommand extends CommandBase<SalesPackageManager>
|
|||||||
public void Execute(Player caller, String[] args)
|
public void Execute(Player caller, String[] args)
|
||||||
{
|
{
|
||||||
resetCommandCharge(caller);
|
resetCommandCharge(caller);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales rank " + args[0] + " TITAN true"));
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales rank " + args[0] + " TITAN"));
|
||||||
|
|
||||||
resetCommandCharge(caller);
|
resetCommandCharge(caller);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales item " + args[0] + " 5 Item Mythical Chest"));
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales item " + args[0] + " 5 Item Mythical Chest"));
|
||||||
|
@ -18,7 +18,7 @@ public class LifetimeUltraCommand extends CommandBase<SalesPackageManager>
|
|||||||
public void Execute(Player caller, String[] args)
|
public void Execute(Player caller, String[] args)
|
||||||
{
|
{
|
||||||
resetCommandCharge(caller);
|
resetCommandCharge(caller);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales rank " + args[0] + " ULTRA true"));
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales rank " + args[0] + " ULTRA"));
|
||||||
|
|
||||||
resetCommandCharge(caller);
|
resetCommandCharge(caller);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales item " + args[0] + " 1 Item Mythical Chest"));
|
Bukkit.getServer().getPluginManager().callEvent(new PlayerCommandPreprocessEvent(caller, "/sales item " + args[0] + " 1 Item Mythical Chest"));
|
||||||
|
@ -15,7 +15,7 @@ import mineplex.staffServer.salespackage.SalesPackageManager;
|
|||||||
|
|
||||||
public class RankCommand extends CommandBase<SalesPackageManager>
|
public class RankCommand extends CommandBase<SalesPackageManager>
|
||||||
{
|
{
|
||||||
private static final List<String> ACCEPTED_RANKS = Collections.unmodifiableList(Arrays.asList("player", "ultra", "hero", "legend", "titan", "eternal"));
|
private static final List<String> ACCEPTED_RANKS = Collections.unmodifiableList(Arrays.asList("PLAYER", "ULTRA", "HERO", "LEGEND", "TITAN", "ETERNAL"));
|
||||||
|
|
||||||
public RankCommand(SalesPackageManager plugin)
|
public RankCommand(SalesPackageManager plugin)
|
||||||
{
|
{
|
||||||
@ -31,7 +31,7 @@ public class RankCommand extends CommandBase<SalesPackageManager>
|
|||||||
}
|
}
|
||||||
|
|
||||||
String playerName = args[0];
|
String playerName = args[0];
|
||||||
String rank = args[1];
|
String rank = args[1].toUpperCase();
|
||||||
|
|
||||||
if (ACCEPTED_RANKS.contains(rank))
|
if (ACCEPTED_RANKS.contains(rank))
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,7 @@ public class DefaultRank extends SalesPackageBase
|
|||||||
|
|
||||||
public void displayToAgent(Player agent, String playerName)
|
public void displayToAgent(Player agent, String playerName)
|
||||||
{
|
{
|
||||||
addButton(agent, "/sales rank " + playerName + " ALL false", " Default Rank.");
|
addButton(agent, "/sales rank " + playerName + " PLAYER", " Default Rank.");
|
||||||
agent.sendMessage(" ");
|
agent.sendMessage(" ");
|
||||||
addBackButton(agent, playerName);
|
addBackButton(agent, playerName);
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ public class LifetimeEternal extends SalesPackageBase
|
|||||||
|
|
||||||
public void displayToAgent(Player agent, String playerName)
|
public void displayToAgent(Player agent, String playerName)
|
||||||
{
|
{
|
||||||
addButton(agent, "/sales rank " + playerName + " ETERNAL true", "Lifetime Eternal.");
|
addButton(agent, "/sales rank " + playerName + " ETERNAL", "Lifetime Eternal.");
|
||||||
addButton(agent, "/sales item " + playerName + " 2 Item Mythical Chest", "2 Mythical Chests.");
|
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 + " 2 Item Illuminated Chest", "2 Illuminated Chests.");
|
||||||
addButton(agent, "/sales item " + playerName + " 1 Item Omega Chest", "1 Omega Chest.");
|
addButton(agent, "/sales item " + playerName + " 1 Item Omega Chest", "1 Omega Chest.");
|
||||||
|
@ -13,7 +13,7 @@ public class LifetimeHero extends SalesPackageBase
|
|||||||
|
|
||||||
public void displayToAgent(Player agent, String playerName)
|
public void displayToAgent(Player agent, String playerName)
|
||||||
{
|
{
|
||||||
addButton(agent, "/sales rank " + playerName + " HERO true", "Lifetime Hero.");
|
addButton(agent, "/sales rank " + playerName + " HERO", "Lifetime Hero.");
|
||||||
addButton(agent, "/sales item " + playerName + " 2 Item Mythical Chest", "2 Mythical Chests.");
|
addButton(agent, "/sales item " + playerName + " 2 Item Mythical Chest", "2 Mythical Chests.");
|
||||||
addButton(agent, "Apply All", "/sales lifetimehero " + playerName, "Apply all above.");
|
addButton(agent, "Apply All", "/sales lifetimehero " + playerName, "Apply all above.");
|
||||||
agent.sendMessage(" ");
|
agent.sendMessage(" ");
|
||||||
|
@ -13,7 +13,7 @@ public class LifetimeLegend extends SalesPackageBase
|
|||||||
|
|
||||||
public void displayToAgent(Player agent, String playerName)
|
public void displayToAgent(Player agent, String playerName)
|
||||||
{
|
{
|
||||||
addButton(agent, "/sales rank " + playerName + " LEGEND true", "Lifetime Legend.");
|
addButton(agent, "/sales rank " + playerName + " LEGEND", "Lifetime Legend.");
|
||||||
addButton(agent, "/sales item " + playerName + " 3 Item Mythical Chest", "3 Mythical Chests.");
|
addButton(agent, "/sales item " + playerName + " 3 Item Mythical Chest", "3 Mythical Chests.");
|
||||||
//addButton(agent, "/sales item " + playerName + " 1 Morph Wither Morph", "Gives Wither Morph.");
|
//addButton(agent, "/sales item " + playerName + " 1 Morph Wither Morph", "Gives Wither Morph.");
|
||||||
//addButton(agent, "/sales item " + playerName + " 1 Pet Widder", "Gives Wither Pet.");
|
//addButton(agent, "/sales item " + playerName + " 1 Pet Widder", "Gives Wither Pet.");
|
||||||
|
@ -13,7 +13,7 @@ public class LifetimeTitan extends SalesPackageBase
|
|||||||
|
|
||||||
public void displayToAgent(Player agent, String playerName)
|
public void displayToAgent(Player agent, String playerName)
|
||||||
{
|
{
|
||||||
addButton(agent, "/sales rank " + playerName + " TITAN true", "Lifetime Titan.");
|
addButton(agent, "/sales rank " + playerName + " TITAN", "Lifetime Titan.");
|
||||||
addButton(agent, "/sales item " + playerName + " 5 Item Mythical Chest", "5 Mythical Chests.");
|
addButton(agent, "/sales item " + playerName + " 5 Item Mythical Chest", "5 Mythical Chests.");
|
||||||
// addButton(agent, "/sales item " + playerName + " 1 Molten Snake", "Gives Molten Snake Mount.");
|
// addButton(agent, "/sales item " + playerName + " 1 Molten Snake", "Gives Molten Snake Mount.");
|
||||||
// addButton(agent, "/sales item " + playerName + " 1 Elder Guardian Morph", "Gives Elder Guardian Morph.");
|
// addButton(agent, "/sales item " + playerName + " 1 Elder Guardian Morph", "Gives Elder Guardian Morph.");
|
||||||
|
@ -13,7 +13,7 @@ public class LifetimeUltra extends SalesPackageBase
|
|||||||
|
|
||||||
public void displayToAgent(Player agent, String playerName)
|
public void displayToAgent(Player agent, String playerName)
|
||||||
{
|
{
|
||||||
addButton(agent, "/sales rank " + playerName + " ULTRA true", "Lifetime Ultra.");
|
addButton(agent, "/sales rank " + playerName + " ULTRA", "Lifetime Ultra.");
|
||||||
addButton(agent, "/sales item " + playerName + " 1 Item Mythical Chest", "1 Mythical Chest.");
|
addButton(agent, "/sales item " + playerName + " 1 Item Mythical Chest", "1 Mythical Chest.");
|
||||||
addButton(agent, "Apply All", "/sales lifetimeultra " + playerName, "Apply all above.");
|
addButton(agent, "Apply All", "/sales lifetimeultra " + playerName, "Apply all above.");
|
||||||
agent.sendMessage(" ");
|
agent.sendMessage(" ");
|
||||||
|
Loading…
Reference in New Issue
Block a user