Implement Castle Assault into the selection compass and re-add old Castle Siege

This commit is contained in:
AlexTheCoder 2017-05-08 17:24:12 -04:00
parent d13610251f
commit 79560fd415
3 changed files with 48 additions and 7 deletions

View File

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

View File

@ -21,6 +21,7 @@ import mineplex.hub.server.ui.button.SelectBHButton;
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.SelectCLANSButton;
import mineplex.hub.server.ui.button.SelectCSButton;
import mineplex.hub.server.ui.button.SelectCTFButton;
@ -63,14 +64,22 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
{
add(1, Material.EGG, C.cYellowB + "Bawk Bawk Battles " + C.cGray + "Challenges", new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "NEW GAME",
C.Reset + "",
C.Reset + "Follow Bawk Bawk's instructions",
C.Reset + "Complete different tasks",
C.Reset + "If you lose, chickens will devour you!"
}, "BBB", "Bawk_Bawk_Battles", new SelectBawkButton(this));
add(4, Material.QUARTZ_BLOCK, C.cYellowB + "Speed Builders " + C.cGray + "Competitive Building", new String[]
add(3, Material.DIAMOND_CHESTPLATE, C.cYellowB + "Castle Assault " + C.cGray + "Fast Paced PvP", new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "NEW GAME",
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(5, Material.QUARTZ_BLOCK, C.cYellowB + "Speed Builders " + C.cGray + "Competitive Building", new String[]
{
C.Reset + "",
C.Reset + "Memorize Gwen the Guardian's builds",
@ -154,13 +163,12 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
C.Reset + "last man standing.",
}, "TDM", "Team_Deathmatch", new SelectTDMButton(this));
add(24, Material.DIAMOND_CHESTPLATE, C.cYellowB + "Castle Siege " + C.cGray + "Fast-Paced PvP", new String[]
add(24, Material.DIAMOND_CHESTPLATE, C.cYellowB + "Castle Siege " + C.cGray + "Team Game", new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "MAJOR UPDATE/REWRITE",
C.Reset + "",
C.Reset + "Combatants must battle to",
C.Reset + "win the day for their king",
C.Reset + "at all costs!",
C.Reset + "Defenders must protect King Sparklez",
C.Reset + "from the endless waves of Undead",
C.Reset + "until the sun rises!",
}, "CS", "Castle_Siege", new SelectCSButton(this));
add(26, Material.GRASS, C.cYellowB + "Block Hunt " + C.cGray + "Cat and Mouse", new String[]
@ -633,6 +641,11 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
getPlugin().getCtfShop().attemptShopOpen(player);
}
public void openCA(Player player)
{
getPlugin().getCastleAssaultShop().attemptShopOpen(player);
}
public void openCS(Player player)
{
getPlugin().getCastleSiegeShop().attemptShopOpen(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 SelectCAButton implements IButton
{
private ServerGameMenu _menu;
public SelectCAButton(ServerGameMenu menu)
{
_menu = menu;
}
@Override
public void onClick(Player player, ClickType clickType)
{
_menu.openCA(player);
}
}