Commit current changes

This commit is contained in:
libraryaddict 2014-12-06 02:09:16 +13:00
parent 6d7a71d043
commit 715862b365
3 changed files with 32 additions and 8 deletions

View File

@ -25,7 +25,6 @@ public class KitEvolve extends MiniPlugin
_arcadeManager = manager;
_kitEvolve = new KitEvolveShop(this, manager, manager.getArcadeManager().GetClients(), manager.getArcadeManager()
.GetDonation(), kits);
// TODO Auto-generated constructor stub
}
@EventHandler

View File

@ -23,7 +23,7 @@ public class KitEvolvePage extends ShopPageBase<KitEvolve, KitEvolveShop>
public KitEvolvePage(KitEvolve plugin, SearchAndDestroy arcadeManager, KitEvolveShop shop, CoreClientManager clientManager,
DonationManager donationManager, Player player, ArrayList<UpgradeKit> kits)
{
super(plugin, shop, clientManager, donationManager, "Kit Evolve Menu", player);
super(plugin, shop, clientManager, donationManager, "Kit Evolution", player);
_search = arcadeManager;
_kits = kits;
BuildPage();
@ -71,13 +71,25 @@ public class KitEvolvePage extends ShopPageBase<KitEvolve, KitEvolveShop>
}
for (UpgradeKit k : _kits)
{
if (getItem(k.kitSlot) == null)
ItemStack item = getItem(k.kitSlot);
if (item == null || item.getType() == Material.AIR)
{
AddItem(k.kitSlot, makeItem(new ItemBuilder(Material.STONE).setTitle(C.cRed + "Locked").build()));
}
}
for (int slot = 0; slot < this.getSize(); slot++)
{
ItemStack item = getItem(slot);
if (item == null || item.getType() == Material.AIR)
{
AddItem(slot, makeItem(new ItemBuilder(Material.STAINED_GLASS_PANE, 1, (short) 7).setTitle(" ").build()));
}
}
}
/**
* Why do I need to call this and additem again?
*/
private ShopItem makeItem(ItemStack item)
{
return new ShopItem(item, "", "", 1, false, false);

View File

@ -198,7 +198,7 @@ public class SearchAndDestroy extends TeamGame
true, "Bomb", "Bomb Exploded");
}
}
// TODO The code below may need changing
// TODO The code below could be used when a team is defeated.
/* if (getBombs().size() == 1)
{
GameTeam winning = getBombs().get(0).getTeam();
@ -352,11 +352,24 @@ public class SearchAndDestroy extends TeamGame
continue;
GetScoreboard().Write(team.GetColor() + C.Bold + team.GetName() + " Team");
GetScoreboard().Write(team.GetPlayers(true).size() + " alive");
// TODO Check bombs armed. Draw.
// Something about max scoreboard size.. So its 3 plus 3-4 for bombs.
int bombsArmed = 0;
for (TeamBomb bomb : bombs)
{
if (bomb.getTeam() == team)
{
bombsArmed++;
}
}
if (bombsArmed > 0)
{
GetScoreboard().Write(C.cRed + bombsArmed + " Bomb" + (bombsArmed > 1 ? "s" : "") + " Armed");
}
else
{
GetScoreboard().Write(C.cYellow + "Bombs Safe");
}
// Max scoreboard of 15? So 2-3 teams it shows bombs. Else.
// Could also shrink scoreboard even more if too many teams.
if (itel.hasNext())
{
GetScoreboard().WriteBlank();