diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/SearchAndDestroy.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/SearchAndDestroy.java index ce52c10b9..17e29f5be 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/SearchAndDestroy.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/SearchAndDestroy.java @@ -105,8 +105,8 @@ public class SearchAndDestroy extends TeamGame for (int a = 0; a < 2; a++) { double angle = ((2 * Math.PI) / 360D) * ((rotAngle + ((360D / 2) * a)) % 360); - double x = Math.cos(angle); - double z = Math.sin(angle); + double x = 0.9 * Math.cos(angle); + double z = 0.9 * Math.sin(angle); Location l = center.clone().add(x, y, z); l.getWorld().spigot() .playEffect(l, newTier == 2 ? Effect.FLAME : Effect.WATERDRIP, 0, 0, 0, 0, 0, 0, 1, 30); @@ -117,8 +117,8 @@ public class SearchAndDestroy extends TeamGame } } }.runTaskTimer(Manager.GetPlugin(), 0, 0); - _kills.put(player.getName(), _kills.get(player.getName()) - 2); _evolves.put(player.getName(), newTier); + _kills.put(player.getName(), _kills.get(player.getName()) - 2); } @EventHandler @@ -198,7 +198,7 @@ public class SearchAndDestroy extends TeamGame } DeathMessages = true; - // TODO The code below could be used when a team is defeated. + // TODO The code below could be used when a team is defeated. /* if (getBombs().size() == 1) { GameTeam winning = getBombs().get(0).getTeam(); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitBow.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitBow.java index 1c8f48d26..8f55f7a30 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitBow.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitBow.java @@ -35,7 +35,7 @@ public class KitBow extends KitHuman new ItemStack(Material.CHAINMAIL_CHESTPLATE), new ItemStack(Material.CHAINMAIL_HELMET) }); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD).setUnbreakable(true).build()); inv.addItem(new ItemBuilder(Material.BOW).setUnbreakable(true).addEnchantment(Enchantment.ARROW_INFINITE, 1).build()); inv.setItem(8, diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitPinner.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitPinner.java index 6301aa340..3dc76f21a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitPinner.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitPinner.java @@ -38,7 +38,7 @@ public class KitPinner extends KitHuman new ItemStack(Material.CHAINMAIL_BOOTS), new ItemStack(Material.CHAINMAIL_LEGGINGS), new ItemStack(Material.CHAINMAIL_CHESTPLATE), new ItemStack(Material.CHAINMAIL_HELMET) }); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD).setUnbreakable(true).build()); inv.addItem(new ItemBuilder(Material.BOW).setUnbreakable(true).addEnchantment(Enchantment.ARROW_INFINITE, 1).build()); inv.setItem(8, diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitPunch.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitPunch.java index c7ed2cf96..379d3d68a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitPunch.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitPunch.java @@ -43,7 +43,7 @@ public class KitPunch extends KitHuman new ItemStack(Material.CHAINMAIL_BOOTS), new ItemStack(Material.CHAINMAIL_LEGGINGS), new ItemStack(Material.CHAINMAIL_CHESTPLATE), new ItemStack(Material.CHAINMAIL_HELMET) }); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD).setUnbreakable(true).build()); inv.addItem(new ItemBuilder(Material.BOW).setUnbreakable(true).addEnchantment(Enchantment.ARROW_INFINITE, 1).build()); inv.setItem(8, diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitQuickshooter.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitQuickshooter.java index 452dee6f9..7ac860164 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitQuickshooter.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitQuickshooter.java @@ -35,7 +35,7 @@ public class KitQuickshooter extends KitHuman public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD).setUnbreakable(true).build()); inv.addItem(new ItemBuilder(Material.BOW).setTitle(C.cGreen + "Left-Click" + C.cWhite + " - " + C.cYellow + "Quickshot") .setUnbreakable(true).addEnchantment(Enchantment.ARROW_INFINITE, 1).build()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitSharpshooter.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitSharpshooter.java index 34184f954..ced452e3c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitSharpshooter.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitSharpshooter.java @@ -40,7 +40,7 @@ public class KitSharpshooter extends KitHuman new ItemStack(Material.CHAINMAIL_BOOTS), new ItemStack(Material.CHAINMAIL_LEGGINGS), new ItemStack(Material.CHAINMAIL_CHESTPLATE), new ItemStack(Material.CHAINMAIL_HELMET) }); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD).setUnbreakable(true).build()); inv.addItem(new ItemBuilder(Material.BOW).setUnbreakable(true).addEnchantment(Enchantment.ARROW_INFINITE, 1).build()); inv.setItem(8, diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitSniper.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitSniper.java index 5b0df1fca..f4eb9425b 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitSniper.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitSniper.java @@ -49,7 +49,7 @@ public class KitSniper extends KitHuman new ItemStack(Material.CHAINMAIL_BOOTS), new ItemStack(Material.CHAINMAIL_LEGGINGS), new ItemStack(Material.CHAINMAIL_CHESTPLATE), new ItemStack(Material.CHAINMAIL_HELMET) }); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD).setUnbreakable(true).build()); inv.addItem(new ItemBuilder(Material.BOW).setUnbreakable(true).addEnchantment(Enchantment.ARROW_INFINITE, 1).build()); inv.setItem(8, diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitThunderstorm.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitThunderstorm.java index 09cd04bbb..2302aa673 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitThunderstorm.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/bow/KitThunderstorm.java @@ -36,7 +36,7 @@ public class KitThunderstorm extends KitHuman public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD).setUnbreakable(true).build()); inv.addItem(new ItemBuilder(Material.BOW).setTitle(C.cGreen + "Left-Click" + C.cWhite + " - " + C.cYellow + "Quickshot") .setUnbreakable(true).addEnchantment(Enchantment.ARROW_INFINITE, 1).build()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitEvade.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitEvade.java index d6101b467..d84930dff 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitEvade.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitEvade.java @@ -35,7 +35,7 @@ public class KitEvade extends Kit public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD) .setTitle(C.cGreen + "Hold Block" + C.cWhite + " - " + C.cYellow + "Evade").setUnbreakable(true).build()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitFlash.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitFlash.java index c01d76bff..946729b18 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitFlash.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitFlash.java @@ -35,7 +35,7 @@ public class KitFlash extends Kit public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_AXE) .setTitle(C.cGreen + "Right-Click" + C.cWhite + " - " + C.cYellow + "Flash").setUnbreakable(true).build()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitMultiFlash.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitMultiFlash.java index cde260f23..9ba218d8d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitMultiFlash.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitMultiFlash.java @@ -35,7 +35,7 @@ public class KitMultiFlash extends Kit public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_AXE) .setTitle(C.cGreen + "Right-Click" + C.cWhite + " - " + C.cYellow + "Flash").setUnbreakable(true).build()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitPhaseBlast.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitPhaseBlast.java index 15295152e..f8f6e9d68 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitPhaseBlast.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitPhaseBlast.java @@ -35,7 +35,7 @@ public class KitPhaseBlast extends Kit public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_AXE) .setTitle(C.cGreen + "Right-Click" + C.cWhite + " - " + C.cYellow + "Flash").setUnbreakable(true).build()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitRewind.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitRewind.java index 0b03b5de8..638316330 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitRewind.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitRewind.java @@ -38,7 +38,7 @@ public class KitRewind extends Kit public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD) .setTitle(C.cGreen + "Hold Block" + C.cWhite + " - " + C.cYellow + "Evade").setUnbreakable(true).build()); inv.addItem(new ItemBuilder(Material.NETHER_STAR) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitRogue.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitRogue.java index 9e93a9b24..832b7f77c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitRogue.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitRogue.java @@ -36,7 +36,7 @@ public class KitRogue extends Kit public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_AXE).setTitle(C.cGray + "No Ability").setUnbreakable(true).build()); inv.setItem(9, new ItemStack(Material.ARROW, 1)); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitWraith.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitWraith.java index 3bb43e01d..7735c15d3 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitWraith.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/rogue/KitWraith.java @@ -35,7 +35,7 @@ public class KitWraith extends Kit public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD) .setTitle(C.cGreen + "Hold Block" + C.cWhite + " - " + C.cYellow + "Evade").setUnbreakable(true).build()); inv.setItem(8, diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitBeserker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitBeserker.java index ccbefe6c6..103f74a73 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitBeserker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitBeserker.java @@ -24,7 +24,7 @@ public class KitBeserker extends Kit { super(manager, "Beserker", KitAvailability.Hide, new String[] { - "Leap and takedown your foes!" + "Leap and bullcharge your foes!" }, new Perk[] { new PerkBullsCharge(), new PerkTakedown() @@ -35,7 +35,7 @@ public class KitBeserker extends Kit public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD) .setTitle(C.cGreen + "Right-Click" + C.cWhite + " - " + C.cYellow + "Takedown").setUnbreakable(true).build()); inv.addItem(new ItemBuilder(Material.IRON_AXE) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitBreaker.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitBreaker.java index 51361ba0f..8ce4ad072 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitBreaker.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitBreaker.java @@ -33,10 +33,9 @@ public class KitBreaker extends Kit public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD) .setTitle(C.cGreen + "Right-Click" + C.cWhite + " - " + C.cYellow + "Takedown").setUnbreakable(true).build()); - inv.addItem(new ItemBuilder(Material.IRON_AXE).setTitle(C.cGray + "No Ability").setUnbreakable(true).build()); inv.setArmorContents(new ItemStack[] { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitChampion.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitChampion.java index c71c59134..d13bc5567 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitChampion.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitChampion.java @@ -34,8 +34,7 @@ public class KitChampion extends Kit public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); - inv.addItem(new ItemBuilder(Material.IRON_SWORD).setTitle(C.cGray + "No Ability").setUnbreakable(true).build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_AXE) .setTitle(C.cGreen + "Right-Click" + C.cWhite + " - " + C.cYellow + "Bulls Charge").setUnbreakable(true).build()); inv.addItem(new ItemStack(Material.GOLDEN_APPLE, 2)); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitJuggernaut.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitJuggernaut.java index ffcc6a20f..e6e8b5bef 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitJuggernaut.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitJuggernaut.java @@ -27,7 +27,7 @@ public class KitJuggernaut extends Kit "Deals damage in a large area" }, new Perk[] { - new PerkHarden(), new PerkSeismicSlamSND() + new PerkHarden(false), new PerkSeismicSlamSND() }, EntityType.ZOMBIE, new ItemStack(Material.IRON_SWORD)); } @@ -35,7 +35,7 @@ public class KitJuggernaut extends Kit public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD) .setTitle(C.cGreen + "Right-Click" + C.cWhite + " - " + C.cYellow + "Seismic Slam").setUnbreakable(true).build()); inv.addItem(new ItemBuilder(Material.IRON_AXE) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitTank.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitTank.java index f47319f73..ccc36e48e 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitTank.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitTank.java @@ -26,7 +26,7 @@ public class KitTank extends Kit "Able to absorb a lot of damage!" }, new Perk[] { - new PerkHarden() + new PerkHarden(true) }, EntityType.ZOMBIE, new ItemStack(Material.IRON_SWORD)); } @@ -34,9 +34,8 @@ public class KitTank extends Kit public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); - inv.addItem(new ItemBuilder(Material.IRON_SWORD).setTitle(C.cGray + "No Ability").setUnbreakable(true).build()); - inv.addItem(new ItemBuilder(Material.IRON_AXE) + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.addItem(new ItemBuilder(Material.IRON_SWORD) .setTitle(C.cGreen + "Right-Click" + C.cWhite + " - " + C.cYellow + "Harden").setUnbreakable(true).build()); inv.addItem(new ItemStack(Material.GOLDEN_APPLE, 2)); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitTitan.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitTitan.java index e49b6e87a..8e1fdbaa3 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitTitan.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitTitan.java @@ -26,7 +26,7 @@ public class KitTitan extends Kit "Master of survival!" }, new Perk[] { - new PerkHarden(), new PerkDefensiveStance() + new PerkHarden(false), new PerkDefensiveStance() }, EntityType.ZOMBIE, new ItemStack(Material.IRON_SWORD)); } @@ -34,7 +34,7 @@ public class KitTitan extends Kit public void GiveItems(Player player) { PlayerInventory inv = player.getInventory(); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD) .setTitle(C.cGreen + "Hold Block" + C.cWhite + " - " + C.cYellow + "Defensive Stance").setUnbreakable(true) .build()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitTrooper.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitTrooper.java index 43547a049..d64947cba 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitTrooper.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/searchanddestroy/kits/trooper/KitTrooper.java @@ -34,7 +34,7 @@ public class KitTrooper extends Kit new ItemStack(Material.IRON_CHESTPLATE), new ItemStack(Material.IRON_HELMET) }); - inv.addItem(new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); + inv.setItem(2, new ItemBuilder(Material.BLAZE_POWDER).setTitle(ChatColor.GOLD + "Fuse").build()); inv.addItem(new ItemBuilder(Material.IRON_SWORD).setUnbreakable(true).build()); inv.addItem(new ItemStack(Material.GOLDEN_APPLE, 2)); inv.setItem(8, new ItemBuilder(Material.LEATHER_CHESTPLATE).setColor(this.Manager.GetGame().GetTeam(player).GetColorBase()).setTitle(ChatColor.WHITE + "Evolve Kit Menu").addLore("Right click to use").build()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkHarden.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkHarden.java index a3d9981a0..c26639849 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkHarden.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkHarden.java @@ -5,6 +5,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.ItemStack; import mineplex.core.common.util.C; import mineplex.core.common.util.F; @@ -16,46 +17,49 @@ import nautilus.game.arcade.kit.Perk; public class PerkHarden extends Perk { - public PerkHarden() - { - super("Harden", new String[] - { - C.cYellow + "Right-Click" + C.cGray + " with Axe to use " + C.cGreen + "Harden" - }); - } - - @EventHandler - public void skill(PlayerInteractEvent event) - { - if (event.isCancelled()) - return; - - if (event.getAction() != Action.RIGHT_CLICK_AIR && event.getAction() != Action.RIGHT_CLICK_BLOCK) - return; - - if (UtilBlock.usable(event.getClickedBlock())) - return; - - if (!UtilGear.isAxe(event.getPlayer().getItemInHand())) - return; - - Player player = event.getPlayer(); - - if (!Kit.HasKit(player)) - return; - - if (!Recharge.Instance.use(player, GetName(), 30000, true, true)) - return; - - //Action - Manager.GetCondition().Factory().Slow(GetName(), player, player, 8, 1, false, false, false, false); - Manager.GetCondition().Factory().HealthBoost(GetName(), player, player, 8, 3, false, false, false); + private boolean _isSword; - //Inform - UtilPlayer.message(player, F.main("Game", "You used " + F.skill(GetName()) + ".")); + public PerkHarden(boolean isSword) + { + super("Harden", new String[] + { + C.cYellow + "Right-Click" + C.cGray + " with Axe to use " + C.cGreen + "Harden" + }); + _isSword = isSword; + } - //Effect - player.getWorld().playSound(player.getLocation(), Sound.HORSE_ARMOR, 1f, 1f); - } + @EventHandler + public void skill(PlayerInteractEvent event) + { + if (event.isCancelled()) + return; + if (event.getAction() != Action.RIGHT_CLICK_AIR && event.getAction() != Action.RIGHT_CLICK_BLOCK) + return; + + if (UtilBlock.usable(event.getClickedBlock())) + return; + + ItemStack item = event.getPlayer().getItemInHand(); + if (_isSword ? !UtilGear.isSword(item) : !UtilGear.isAxe(item)) + return; + + Player player = event.getPlayer(); + + if (!Kit.HasKit(player)) + return; + + if (!Recharge.Instance.use(player, GetName(), 30000, true, true)) + return; + + // Action + Manager.GetCondition().Factory().Slow(GetName(), player, player, 8, 1, false, false, false, false); + Manager.GetCondition().Factory().HealthBoost(GetName(), player, player, 8, 3, false, false, false); + + // Inform + UtilPlayer.message(player, F.main("Game", "You used " + F.skill(GetName()) + ".")); + + // Effect + player.getWorld().playSound(player.getLocation(), Sound.HORSE_ARMOR, 1f, 1f); + } }