Reformat Block Hunt

This commit is contained in:
Nate Mortensen 2016-11-08 08:36:19 -07:00 committed by Shaun Bennett
parent 6db79c3ca5
commit 3b83a9bdc3

View File

@ -265,8 +265,7 @@ public class HideSeek extends TeamGame
break; break;
} }
} } else if (packetInfo.getPacket() instanceof PacketPlayOutEntityDestroy)
else if (packetInfo.getPacket() instanceof PacketPlayOutEntityDestroy)
{ {
for (int i : ((PacketPlayOutEntityDestroy) packetInfo.getPacket()).a) for (int i : ((PacketPlayOutEntityDestroy) packetInfo.getPacket()).a)
{ {
@ -361,8 +360,7 @@ public class HideSeek extends TeamGame
System.out.println("prep"); System.out.println("prep");
this.getArcadeManager().getPacketHandler().addPacketHandler(_blockDisguise, PacketPlayOutSpawnEntityLiving.class, PacketPlayOutEntityDestroy.class); this.getArcadeManager().getPacketHandler().addPacketHandler(_blockDisguise, PacketPlayOutSpawnEntityLiving.class, PacketPlayOutEntityDestroy.class);
this.getArcadeManager().getPacketHandler().addPacketHandler(_useEntity, true, PacketPlayInUseEntity.class); this.getArcadeManager().getPacketHandler().addPacketHandler(_useEntity, true, PacketPlayInUseEntity.class);
} } else if (event.GetState() == GameState.Dead)
else if (event.GetState() == GameState.Dead)
{ {
this.getArcadeManager().getPacketHandler().removePacketHandler(_blockDisguise); this.getArcadeManager().getPacketHandler().removePacketHandler(_blockDisguise);
this.getArcadeManager().getPacketHandler().removePacketHandler(_useEntity); this.getArcadeManager().getPacketHandler().removePacketHandler(_useEntity);
@ -436,8 +434,7 @@ public class HideSeek extends TeamGame
{ {
if (kit.GetName().contains("Hider")) if (kit.GetName().contains("Hider"))
team.GetRestrictedKits().add(kit); team.GetRestrictedKits().add(kit);
} } else
else
{ {
if (kit.GetName().contains("Hunter")) if (kit.GetName().contains("Hunter"))
team.GetRestrictedKits().add(kit); team.GetRestrictedKits().add(kit);
@ -477,8 +474,7 @@ public class HideSeek extends TeamGame
bow.addEnchantment(Enchantment.ARROW_INFINITE, 1); bow.addEnchantment(Enchantment.ARROW_INFINITE, 1);
player.getInventory().setItem(1, bow); player.getInventory().setItem(1, bow);
player.getInventory().setItem(28, ItemStackFactory.Instance.CreateStack(Material.ARROW)); player.getInventory().setItem(28, ItemStackFactory.Instance.CreateStack(Material.ARROW));
} } else
else
{ {
// Axe // Axe
player.getInventory().setItem(0, player.getInventory().setItem(0,
@ -744,8 +740,7 @@ public class HideSeek extends TeamGame
{ {
proj = (Projectile) eventEE.getDamager(); proj = (Projectile) eventEE.getDamager();
damager = (LivingEntity) proj.getShooter(); damager = (LivingEntity) proj.getShooter();
} } else if (eventEE.getDamager() instanceof LivingEntity)
else if (eventEE.getDamager() instanceof LivingEntity)
{ {
damager = (LivingEntity) eventEE.getDamager(); damager = (LivingEntity) eventEE.getDamager();
} }
@ -894,8 +889,7 @@ public class HideSeek extends TeamGame
// Inform // Inform
UtilPlayer.message(player, F.main("Game", "You upgraded to " + F.elem("Super Axe") + "!")); UtilPlayer.message(player, F.main("Game", "You upgraded to " + F.elem("Super Axe") + "!"));
} } else if (count == 8)
else if (count == 8)
{ {
player.getInventory().remove(Material.STONE_AXE); player.getInventory().remove(Material.STONE_AXE);
player.getInventory().addItem( player.getInventory().addItem(
@ -906,8 +900,7 @@ public class HideSeek extends TeamGame
// Inform // Inform
UtilPlayer.message(player, F.main("Game", "You upgraded to " + F.elem("Ultra Axe") + "!")); UtilPlayer.message(player, F.main("Game", "You upgraded to " + F.elem("Ultra Axe") + "!"));
} } else if (count == 12)
else if (count == 12)
{ {
player.getInventory().remove(Material.IRON_AXE); player.getInventory().remove(Material.IRON_AXE);
player.getInventory().addItem( player.getInventory().addItem(
@ -918,8 +911,7 @@ public class HideSeek extends TeamGame
// Inform // Inform
UtilPlayer.message(player, F.main("Game", "You upgraded to " + F.elem("Hyper Axe") + "!")); UtilPlayer.message(player, F.main("Game", "You upgraded to " + F.elem("Hyper Axe") + "!"));
} } else if (count < 12)
else if (count < 12)
{ {
// Sound // Sound
player.playSound(player.getLocation(), Sound.ORB_PICKUP, 1f, 1f); player.playSound(player.getLocation(), Sound.ORB_PICKUP, 1f, 1f);
@ -958,8 +950,7 @@ public class HideSeek extends TeamGame
// Sound // Sound
player.getWorld().playSound(player.getLocation(), Sound.BLAZE_BREATH, 1f, 1f); player.getWorld().playSound(player.getLocation(), Sound.BLAZE_BREATH, 1f, 1f);
} } else if (UtilGear.isMat(player.getItemInHand(), Material.STONE_AXE))
else if (UtilGear.isMat(player.getItemInHand(), Material.STONE_AXE))
{ {
Manager.GetCondition().Factory().Speed("Boost", player, player, 4, 1, false, false, false); Manager.GetCondition().Factory().Speed("Boost", player, player, 4, 1, false, false, false);
@ -968,8 +959,7 @@ public class HideSeek extends TeamGame
// Sound // Sound
player.getWorld().playSound(player.getLocation(), Sound.BLAZE_BREATH, 1f, 1f); player.getWorld().playSound(player.getLocation(), Sound.BLAZE_BREATH, 1f, 1f);
} } else if (UtilGear.isMat(player.getItemInHand(), Material.IRON_AXE))
else if (UtilGear.isMat(player.getItemInHand(), Material.IRON_AXE))
{ {
Manager.GetCondition().Factory().Speed("Boost", player, player, 4, 1, false, false, false); Manager.GetCondition().Factory().Speed("Boost", player, player, 4, 1, false, false, false);
Manager.GetCondition().Factory().Regen("Boost", player, player, 4, 0, false, false, false); Manager.GetCondition().Factory().Regen("Boost", player, player, 4, 0, false, false, false);
@ -979,8 +969,7 @@ public class HideSeek extends TeamGame
// Sound // Sound
player.getWorld().playSound(player.getLocation(), Sound.BLAZE_BREATH, 1f, 1f); player.getWorld().playSound(player.getLocation(), Sound.BLAZE_BREATH, 1f, 1f);
} } else if (UtilGear.isMat(player.getItemInHand(), Material.DIAMOND_AXE))
else if (UtilGear.isMat(player.getItemInHand(), Material.DIAMOND_AXE))
{ {
Manager.GetCondition().Factory().Speed("Boost", player, player, 4, 2, false, false, false); Manager.GetCondition().Factory().Speed("Boost", player, player, 4, 2, false, false, false);
Manager.GetCondition().Factory().Regen("Boost", player, player, 4, 1, false, false, false); Manager.GetCondition().Factory().Regen("Boost", player, player, 4, 1, false, false, false);
@ -1246,7 +1235,6 @@ public class HideSeek extends TeamGame
return; return;
// Hide Time // Hide Time
if (!_started) if (!_started)
{ {
@ -1325,8 +1313,7 @@ public class HideSeek extends TeamGame
Scoreboard.writeNewLine(); Scoreboard.writeNewLine();
Scoreboard.write(C.cYellow + C.Bold + "Hide Time"); Scoreboard.write(C.cYellow + C.Bold + "Hide Time");
Scoreboard.write(UtilTime.MakeStr(Math.max(0, timeLeft), 0)); Scoreboard.write(UtilTime.MakeStr(Math.max(0, timeLeft), 0));
} } else
else
{ {
long timeLeft = _gameTime - (System.currentTimeMillis() - GetStateTime() - _hideTime); long timeLeft = _gameTime - (System.currentTimeMillis() - GetStateTime() - _hideTime);