Add Castle Assault TDM to compass

This commit is contained in:
AlexTheCoder 2017-05-16 21:14:47 -04:00 committed by cnr
parent c3bd123ea1
commit 672ada3f31
3 changed files with 48 additions and 5 deletions

View File

@ -792,6 +792,11 @@ public class ServerManager extends MiniPlugin implements BrawlShopProvider
{
return _serverNpcShopMap.get("Castle Assault");
}
public ShopBase<ServerManager> getCastleAssaultTDMShop()
{
return _serverNpcShopMap.get("Castle Assault TDM");
}
public ShopBase<ServerManager> getCastleSiegeShop()
{

View File

@ -22,6 +22,7 @@ import mineplex.hub.server.ui.button.SelectBLDButton;
import mineplex.hub.server.ui.button.SelectBRButton;
import mineplex.hub.server.ui.button.SelectBawkButton;
import mineplex.hub.server.ui.button.SelectCAButton;
import mineplex.hub.server.ui.button.SelectCATDMButton;
import mineplex.hub.server.ui.button.SelectCLANSButton;
import mineplex.hub.server.ui.button.SelectCSButton;
import mineplex.hub.server.ui.button.SelectCTFButton;
@ -62,7 +63,7 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
@Override
protected void buildPage()
{
add(1, Material.EGG, C.cYellowB + "Bawk Bawk Battles " + C.cGray + "Challenges", new String[]
add(0, Material.EGG, C.cYellowB + "Bawk Bawk Battles " + C.cGray + "Challenges", new String[]
{
C.Reset + "",
C.Reset + "Follow Bawk Bawk's instructions",
@ -70,16 +71,25 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
C.Reset + "If you lose, chickens will devour you!"
}, "BBB", "Bawk_Bawk_Battles", new SelectBawkButton(this));
add(3, Material.DIAMOND_CHESTPLATE, C.cYellowB + "Castle Assault " + C.cGray + "Fast Paced PvP", new String[]
add(2, Material.DIAMOND_CHESTPLATE, C.cYellowB + "Castle Assault " + C.cGray + "Fast Paced PvP", new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "NEW GAME",
(_extraValue ? C.cAquaB : C.cWhiteB) + "NEW UPDATES",
C.Reset + "",
C.Reset + "Combatants must battle to",
C.Reset + "win the day for their king",
C.Reset + "at all costs!",
}, "CA", "Castle_Assault", new SelectCAButton(this));
add(4, Material.DIAMOND_CHESTPLATE, C.cYellowB + "Castle Assault TDM " + C.cGray + "Team PvP", new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "NEW GAME",
C.Reset + "",
C.Reset + "Combatants must battle to",
C.Reset + "win glory for their team",
C.Reset + "by slaying the enemy!",
}, "CATDM", "Castle_Assault_TDM", new SelectCATDMButton(this));
add(5, Material.QUARTZ_BLOCK, C.cYellowB + "Speed Builders " + C.cGray + "Competitive Building", new String[]
add(6, Material.QUARTZ_BLOCK, C.cYellowB + "Speed Builders " + C.cGray + "Competitive Building", new String[]
{
C.Reset + "",
C.Reset + "Memorize Gwen the Guardian's builds",
@ -87,7 +97,7 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
C.Reset + "The least correct builder is eliminated.",
}, "SB", "Speed_Builders", new SelectSBButton(this));
add(7, Material.TNT, C.cYellowB + "Dragon Escape " + C.cGray + "Fast Paced Parkour", new String[]
add(8, Material.TNT, C.cYellowB + "Dragon Escape " + C.cGray + "Fast Paced Parkour", new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "FEATURED ARCADE GAME",
C.Reset + "",
@ -645,6 +655,11 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
{
getPlugin().getCastleAssaultShop().attemptShopOpen(player);
}
public void openCATDM(Player player)
{
getPlugin().getCastleAssaultTDMShop().attemptShopOpen(player);
}
public void openCS(Player player)
{

View File

@ -0,0 +1,23 @@
package mineplex.hub.server.ui.button;
import org.bukkit.entity.Player;
import org.bukkit.event.inventory.ClickType;
import mineplex.core.shop.item.IButton;
import mineplex.hub.server.ui.ServerGameMenu;
public class SelectCATDMButton implements IButton
{
private ServerGameMenu _menu;
public SelectCATDMButton(ServerGameMenu menu)
{
_menu = menu;
}
@Override
public void onClick(Player player, ClickType clickType)
{
_menu.openCATDM(player);
}
}