Add Valentines Vendetta to quick server menu

This commit is contained in:
Shaun Bennett 2016-02-12 05:27:50 -06:00
parent 960a0cdabb
commit e8559d423a
3 changed files with 53 additions and 8 deletions

View File

@ -913,4 +913,9 @@ public class ServerManager extends MiniPlugin
{
return _serverNpcShopMap.get("Type Wars");
}
public ShopBase<ServerManager> getValentinesShop()
{
return _serverNpcShopMap.get("Valentines");
}
}

View File

@ -40,17 +40,16 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
@Override
protected void buildPage()
{
addButton(2, new ItemBuilder(Material.NAME_TAG).setTitle(C.cYellowB + "Type Wars " + C.cGray + "Team Deathmatch").addLore(new String[]
addButton(2, new ItemBuilder(Material.RED_ROSE).setTitle(C.cYellowB + "Valentines Vendetta " + C.cGray + "Save Valentines!").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "NEW GAME",
(_extraValue ? C.cAquaB : C.cWhiteB) + "LIMITED TIME GAME",
C.Reset + "",
C.Reset + "Attack your enemies with",
C.Reset + "waves of mobs. Defend your giant",
C.Reset + "by typing the name of an enemy mob",
C.Reset + "to kill it.",
C.Reset + "Calvin the Cow has a Valentines Date,",
C.Reset + "but he was robbed by the nasty pigs!",
C.Reset + "Recover his items, and save the day!",
C.Reset + "",
C.Reset + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("TW") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectTWButton(this));
C.Reset + "Join " + ChatColor.GREEN + getPlugin().getGroupTagPlayerCount("VV") + C.Reset + " other players!",
}).setHideInfo(true).build(), new SelectVVButton(this));
addButton(4, new ItemBuilder(Material.QUARTZ_BLOCK).setTitle(C.cYellowB + "Speed Builders " + C.cGray + "Competitive Building").addLore(new String[]
{
@ -76,6 +75,19 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
}).setHideInfo(true).build(), new SelectFEATButton(this, "Gladiators"));
*/
/*
addButton(6, new ItemBuilder(Material.LAVA_BUCKET).setTitle(C.cYellowB + "Micro Battle" + C.cGray + " 4 Team Deathmatch").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "FEATURED ARCADE GAME",
C.Reset + "",
C.Reset + "4 teams stand alone",
C.Reset + "Who shall remain victorious",
C.Reset + "You decide",
C.Reset + "",
C.Reset + "Join " + C.cGreen + getPlugin().getGroupTagPlayerCount("MB") + C.Reset + " other players!"
}).setHideInfo(true).build(), new SelectFEATButton(this, "Micro Battle"));
*/
addButton(6, new ItemBuilder(Material.LAVA_BUCKET).setTitle(C.cYellowB + "Micro Battle" + C.cGray + " 4 Team Deathmatch").addLore(new String[]
{
(_extraValue ? C.cAquaB : C.cWhiteB) + "FEATURED ARCADE GAME",
@ -681,4 +693,9 @@ public class ServerGameMenu extends ShopPageBase<ServerManager, QuickShop>
{
getPlugin().getTypeWarsShop().attemptShopOpen(player);
}
public void openValentines(Player player)
{
getPlugin().getValentinesShop().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 SelectVVButton implements IButton
{
private ServerGameMenu _menu;
public SelectVVButton(ServerGameMenu menu)
{
_menu = menu;
}
@Override
public void onClick(Player player, ClickType clickType)
{
_menu.openValentines(player);
}
}