diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameTeam.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameTeam.java index a9ea5ab42..c49535288 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameTeam.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/GameTeam.java @@ -81,8 +81,12 @@ public class GameTeam } public Location GetSpawn() - { + { ArrayList valid = new ArrayList(); + + Location best = null; + double bestDist = 0; + for (Location loc : _spawns) { double closestPlayer = -1; @@ -95,6 +99,12 @@ public class GameTeam closestPlayer = playerDist; } + if (best == null || closestPlayer > bestDist) + { + best = loc; + bestDist = closestPlayer; + } + if (closestPlayer > _spawnDistance) { valid.add(loc); @@ -104,6 +114,9 @@ public class GameTeam if (valid.size() > 0) valid.get(UtilMath.r(valid.size())); + if (best != null) + return best; + return _spawns.get(UtilMath.r(_spawns.size())); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/SuperSmash.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/SuperSmash.java index 7d499a1e8..425d67b59 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/SuperSmash.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/SuperSmash.java @@ -13,6 +13,7 @@ import org.bukkit.event.entity.EntityRegainHealthEvent; import org.bukkit.event.entity.EntityDamageEvent.DamageCause; import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason; import org.bukkit.event.entity.PlayerDeathEvent; +import org.bukkit.event.player.PlayerInteractEvent; import mineplex.core.common.util.C; import mineplex.core.common.util.F; @@ -21,6 +22,7 @@ import mineplex.core.common.util.UtilPlayer; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.minecraft.game.core.damage.CustomDamageEvent; +import nautilus.game.arcade.ArcadeFormat; import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.GameType; import nautilus.game.arcade.events.GameStateChangeEvent; @@ -50,9 +52,12 @@ public class SuperSmash extends SoloGame new KitSnowman(manager), new KitBlaze(manager), - + new KitWitherSkeleton(manager), + new KitChicken(manager), + new KitKnight(manager), new KitSkySquid(manager), + }, new String[] @@ -73,6 +78,10 @@ public class SuperSmash extends SoloGame this.PrepareFreeze = false; this.CompassEnabled = true; + + this.SpawnDistanceRequirement = 16; + + this.InventoryOpen = true; } @EventHandler(priority = EventPriority.HIGH) @@ -193,6 +202,9 @@ public class SuperSmash extends SoloGame if (event.GetCause() == DamageCause.VOID || event.GetCause() == DamageCause.LAVA) { + event.GetDamageeEntity().eject(); + event.GetDamageeEntity().leaveVehicle(); + if (event.GetDamageePlayer() != null) event.GetDamageeEntity().getWorld().strikeLightningEffect(event.GetDamageeEntity().getLocation()); @@ -237,4 +249,47 @@ public class SuperSmash extends SoloGame UtilInv.Update(player); } } + + @EventHandler(priority = EventPriority.LOWEST) + public void AbilityDescription(PlayerInteractEvent event) + { + if (event.isCancelled()) + return; + + Player player = event.getPlayer(); + + if (player.getItemInHand() == null) + return; + + if (player.getItemInHand().getItemMeta() == null) + return; + + if (player.getItemInHand().getItemMeta().getDisplayName() == null) + return; + + if (player.getItemInHand().getItemMeta().getLore() == null) + return; + + if (Manager.GetGame() == null || Manager.GetGame().GetState() != GameState.Recruit) + return; + + for (int i=player.getItemInHand().getItemMeta().getLore().size() ; i<=7 ; i++) + UtilPlayer.message(player, " "); + + UtilPlayer.message(player, ArcadeFormat.Line); + + UtilPlayer.message(player, "§aAbility - §f§l" + player.getItemInHand().getItemMeta().getDisplayName()); + + //Perk Descs + for (String line : player.getItemInHand().getItemMeta().getLore()) + { + UtilPlayer.message(player, line); + } + + UtilPlayer.message(player, ArcadeFormat.Line); + + player.playSound(player.getLocation(), Sound.NOTE_PLING, 1f, 2f); + + event.setCancelled(true); + } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitBlaze.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitBlaze.java index 813c146cf..25e28a880 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitBlaze.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitBlaze.java @@ -5,6 +5,7 @@ import org.bukkit.Material; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; +import org.bukkit.inventory.ItemStack; import mineplex.core.common.util.C; import mineplex.core.disguise.disguises.DisguiseBlaze; @@ -42,8 +43,7 @@ public class KitBlaze extends SmashKit new PerkFirefly() }, EntityType.BLAZE, - null, - Material.BLAZE_ROD); + new ItemStack(Material.BLAZE_ROD)); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitChicken.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitChicken.java index 351b36e13..ba3c61645 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitChicken.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitChicken.java @@ -4,6 +4,7 @@ import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; import mineplex.core.common.util.C; import mineplex.core.disguise.disguises.DisguiseChicken; @@ -36,8 +37,7 @@ public class KitChicken extends SmashKit }, EntityType.CHICKEN, - null, - Material.EGG); + new ItemStack(Material.EGG)); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitEnderman.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitEnderman.java index 5a23af6dc..dee911379 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitEnderman.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitEnderman.java @@ -8,6 +8,7 @@ import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.entity.PlayerDeathEvent; +import org.bukkit.inventory.ItemStack; import mineplex.core.common.util.C; import mineplex.core.disguise.disguises.DisguiseEnderman; @@ -43,8 +44,7 @@ public class KitEnderman extends SmashKit new PerkBlockToss() }, EntityType.ENDERMAN, - null, - Material.ENDER_PEARL); + new ItemStack(Material.ENDER_PEARL)); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitGolem.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitGolem.java index 04be78ac6..de9ef6483 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitGolem.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitGolem.java @@ -4,6 +4,7 @@ import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; import mineplex.core.common.util.C; import mineplex.core.disguise.disguises.DisguiseIronGolem; @@ -34,8 +35,7 @@ public class KitGolem extends SmashKit }, EntityType.IRON_GOLEM, - null, - Material.IRON_BLOCK); + new ItemStack(Material.IRON_BLOCK)); } @Override diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitKnight.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitKnight.java index a2a50d598..ea87019b0 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitKnight.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitKnight.java @@ -1,25 +1,54 @@ package nautilus.game.arcade.game.standalone.smash.kits; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; + import org.bukkit.ChatColor; +import org.bukkit.Location; import org.bukkit.Material; +import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; +import org.bukkit.entity.Horse; +import org.bukkit.entity.Horse.Color; +import org.bukkit.entity.Horse.Style; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Horse.Variant; import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.entity.EntityDamageEvent.DamageCause; +import org.bukkit.event.player.PlayerInteractEntityEvent; +import org.bukkit.inventory.ItemStack; import mineplex.core.common.util.C; -import mineplex.core.disguise.disguises.DisguiseSpider; +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilEnt; +import mineplex.core.common.util.UtilPlayer; import mineplex.core.itemstack.ItemStackFactory; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import mineplex.minecraft.game.core.damage.CustomDamageEvent; import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.kit.KitAvailability; import nautilus.game.arcade.kit.Perk; import nautilus.game.arcade.kit.SmashKit; -import nautilus.game.arcade.kit.perks.PerkDoubleJump; +import nautilus.game.arcade.kit.perks.PerkDoubleJumpHorse; +import nautilus.game.arcade.kit.perks.PerkFletcher; +import nautilus.game.arcade.kit.perks.PerkHorseKick; +import nautilus.game.arcade.kit.perks.PerkKnockbackArrow; import nautilus.game.arcade.kit.perks.PerkSmashStats; public class KitKnight extends SmashKit { + private HashMap _mounts = new HashMap(); + private HashSet _horses = new HashSet(); + + private HashSet _calledEvents = new HashSet(); + public KitKnight(ArcadeManager manager) { - super(manager, ChatColor.RED + "Undead Knight", KitAvailability.Blue, + super(manager, "Undead Knight", KitAvailability.Blue, new String[] { @@ -27,42 +56,206 @@ public class KitKnight extends SmashKit new Perk[] { - new PerkSmashStats(7, 1.6, 0.25, 7), - new PerkDoubleJump("Double Jump", 0.9, 0.9, false), + new PerkSmashStats(6, 1.2, 0.25, 7.5), + new PerkFletcher(1, 2, false), + new PerkKnockbackArrow(2), + new PerkDoubleJumpHorse(), + new PerkHorseKick(), }, EntityType.HORSE, - null, - Material.IRON_CHESTPLATE); + new ItemStack(Material.IRON_BARDING)); } @Override public void GiveItems(Player player) { - player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_SWORD, (byte)0, 1, - C.cYellow + C.Bold + "Hold/Release Block" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "???", + player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1, + C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Horse Kick", new String[] { - ChatColor.RESET + "", - ChatColor.RESET + "", + })); - player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1, - C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "???", + player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.BOW, (byte)0, 1, + C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Coming Soon...", new String[] { - ChatColor.RESET + "", - ChatColor.RESET + "", + })); player.getInventory().setHelmet(ItemStackFactory.Instance.CreateStack(Material.IRON_HELMET)); player.getInventory().setChestplate(ItemStackFactory.Instance.CreateStack(Material.IRON_CHESTPLATE)); - player.getInventory().setLeggings(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_LEGGINGS)); + player.getInventory().setLeggings(ItemStackFactory.Instance.CreateStack(Material.IRON_LEGGINGS)); player.getInventory().setBoots(ItemStackFactory.Instance.CreateStack(Material.IRON_BOOTS)); - + //Disguise - DisguiseSpider disguise = new DisguiseSpider(player); - disguise.SetName(C.cYellow + player.getName()); - disguise.SetCustomNameVisible(true); - Manager.GetDisguise().disguise(disguise); + Manager.GetGame().CreatureAllowOverride = true; + final Horse horse = player.getWorld().spawn(player.getLocation(), Horse.class); + Manager.GetGame().CreatureAllowOverride = false; + + //Owner + horse.setTamed(true); + horse.setOwner(player); + horse.setMaxDomestication(1); + + //Visual + horse.setColor(Color.DARK_BROWN); + horse.setStyle(Style.WHITE_DOTS); + horse.setVariant(Variant.UNDEAD_HORSE); + horse.getInventory().setSaddle(new ItemStack(Material.SADDLE)); + horse.getInventory().setArmor(new ItemStack(Material.IRON_BARDING)); + + //Stats + horse.setAdult(); + horse.setJumpStrength(1); + horse.setMaxHealth(100); + horse.setHealth(horse.getMaxHealth()); + + _horses.add(horse); + _mounts.put(player, horse); + + final Player fPlayer = player; + + Manager.GetPlugin().getServer().getScheduler().scheduleSyncDelayedTask(Manager.GetPlugin(), new Runnable() + { + public void run() + { + horse.setPassenger(fPlayer); + } + }, 1); + } + + @EventHandler + public void HorseUpdate(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + Iterator horseIterator = _horses.iterator(); + + while (horseIterator.hasNext()) + { + Horse horse = horseIterator.next(); + + if (horse.isValid() && _mounts.containsValue(horse)) + continue; + + horseIterator.remove(); + horse.remove(); + } + } + + @EventHandler + public void HorseUpdate(PlayerInteractEntityEvent event) + { + if (!(event.getRightClicked() instanceof Horse)) + return; + + Player player = event.getPlayer(); + Horse horse = (Horse)event.getRightClicked(); + + if (_mounts.containsKey(player) && _mounts.get(player).equals(horse)) + return; + + UtilPlayer.message(player, F.main("Game", "This is not your " + F.elem("Skeletal Horse") + "!")); + event.setCancelled(true); + } + + @EventHandler(priority = EventPriority.LOWEST) + public void PlayerDamage(CustomDamageEvent event) + { + if (_calledEvents.contains(event)) + return; + + Player damagee = event.GetDamageePlayer(); + if (damagee == null) return; + + if (damagee.getVehicle() == null) + return; + + if (!(damagee.getVehicle() instanceof Horse)) + return; + + if (event.GetCause() == DamageCause.SUFFOCATION) + { + event.SetCancelled("Horse Suffocation"); + return; + } + + Horse horse = (Horse)damagee.getVehicle(); + + //Damage Event + CustomDamageEvent newEvent = new CustomDamageEvent(horse, event.GetDamagerEntity(true), event.GetProjectile(), + event.GetCause(), event.GetDamageInitial(), true, false, false, + UtilEnt.getName(event.GetDamagerPlayer(true)), event.GetReason(), false); + + _calledEvents.add(newEvent); + Manager.GetPlugin().getServer().getPluginManager().callEvent(newEvent); + } + + @EventHandler(priority = EventPriority.LOWEST) + public void HorseDamage(CustomDamageEvent event) + { + if (_calledEvents.contains(event)) + return; + + if (event.GetCause() == DamageCause.THORNS) + return; + + if (!(event.GetDamageeEntity() instanceof Horse)) + return; + + Horse horse = (Horse)event.GetDamageeEntity(); + + if (horse.getPassenger() == null) + return; + + if (!(horse.getPassenger() instanceof Player)) + return; + + Player player = (Player)horse.getPassenger(); + + //Damage Event + CustomDamageEvent newEvent = new CustomDamageEvent(player, event.GetDamagerEntity(true), event.GetProjectile(), + event.GetCause(), event.GetDamageInitial(), true, false, false, + UtilEnt.getName(event.GetDamagerPlayer(true)), event.GetReason(), false); + + _calledEvents.add(newEvent); + Manager.GetPlugin().getServer().getPluginManager().callEvent(newEvent); + + //Add Knockback + event.AddKnockback("Knockback Multiplier", 1.2); + } + + @Override + public Entity SpawnEntity(Location loc) + { + EntityType type = _entityType; + if (type == EntityType.PLAYER) + type = EntityType.ZOMBIE; + + LivingEntity entity = (LivingEntity) Manager.GetCreature().SpawnEntity(loc, type); + + entity.setRemoveWhenFarAway(false); + entity.setCustomName(GetAvailability().GetColor() + GetName() + " Kit" + (GetAvailability() == KitAvailability.Blue ? ChatColor.GRAY + " (" + ChatColor.WHITE + "Ultra" + ChatColor.GRAY + ")" : "")); + entity.setCustomNameVisible(true); + entity.getEquipment().setItemInHand(_itemInHand); + + if (type == EntityType.HORSE) + { + Horse horse = (Horse)entity; + horse.setAdult(); + horse.setColor(Color.DARK_BROWN); + horse.setStyle(Style.WHITE_DOTS); + horse.setVariant(Variant.UNDEAD_HORSE); + horse.getInventory().setSaddle(new ItemStack(Material.SADDLE)); + horse.getInventory().setArmor(new ItemStack(Material.IRON_BARDING)); + } + + UtilEnt.Vegetate(entity); + + SpawnCustom(entity); + + return entity; } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSkeleton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSkeleton.java index d956b438b..16f4134df 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSkeleton.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSkeleton.java @@ -13,6 +13,7 @@ import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.kit.KitAvailability; import nautilus.game.arcade.kit.Perk; import nautilus.game.arcade.kit.SmashKit; +import nautilus.game.arcade.kit.perks.PerkBarrage; import nautilus.game.arcade.kit.perks.PerkBoneExplosion; import nautilus.game.arcade.kit.perks.PerkDoubleJump; import nautilus.game.arcade.kit.perks.PerkFletcher; @@ -37,8 +38,8 @@ public class KitSkeleton extends SmashKit new PerkFletcher(1, 2, false), new PerkKnockbackArrow(2), new PerkBoneExplosion(), - new PerkRopedArrow("Roped Arrow", 1.2, 3000), - //new PerkBarrage(5, 250, true), + new PerkRopedArrow("Roped Arrow", 1, 2500), + new PerkBarrage(5, 250, true), }, EntityType.SKELETON, new ItemStack(Material.BOW)); @@ -63,6 +64,15 @@ public class KitSkeleton extends SmashKit ChatColor.RESET + "collides with something, you are pulled", ChatColor.RESET + "towards it, with great power.", })); + + player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.ARROW, (byte)0, 1, + C.cYellow + C.Bold + "Charge Bow" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Barrage", + new String[] + { + ChatColor.RESET + "Slowly load more arrows into your bow.", + ChatColor.RESET + "When you release, you will quickly fire", + ChatColor.RESET + "all the arrows in succession.", + })); player.getInventory().setHelmet(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_HELMET)); player.getInventory().setChestplate(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_CHESTPLATE)); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSkySquid.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSkySquid.java index 205f55664..93500bd89 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSkySquid.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSkySquid.java @@ -4,6 +4,7 @@ import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; import mineplex.core.common.util.C; import mineplex.core.disguise.disguises.DisguiseSquid; @@ -35,8 +36,7 @@ public class KitSkySquid extends SmashKit new PerkInkBlast(), }, EntityType.SQUID, - null, - Material.INK_SACK); + new ItemStack(Material.INK_SACK)); } @Override diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSlime.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSlime.java index 9a00f2772..31dda4a54 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSlime.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSlime.java @@ -4,6 +4,7 @@ import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; import mineplex.core.common.util.C; import mineplex.core.disguise.disguises.DisguiseSlime; @@ -35,8 +36,7 @@ public class KitSlime extends SmashKit new PerkSlimeRocket(), }, EntityType.SLIME, - null, - Material.SLIME_BALL); + new ItemStack(Material.SLIME_BALL)); } @Override diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSnowman.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSnowman.java index 0a97a415e..c65633a4d 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSnowman.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSnowman.java @@ -4,6 +4,7 @@ import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; import mineplex.core.common.util.C; import mineplex.core.disguise.disguises.DisguiseSnowman; @@ -14,9 +15,9 @@ import nautilus.game.arcade.kit.Perk; import nautilus.game.arcade.kit.SmashKit; import nautilus.game.arcade.kit.perks.PerkArcticAura; import nautilus.game.arcade.kit.perks.PerkBlizzard; +import nautilus.game.arcade.kit.perks.PerkDamageSnow; import nautilus.game.arcade.kit.perks.PerkDoubleJump; import nautilus.game.arcade.kit.perks.PerkIcePath; -import nautilus.game.arcade.kit.perks.PerkKnockbackSnow; import nautilus.game.arcade.kit.perks.PerkSmashStats; public class KitSnowman extends SmashKit @@ -31,16 +32,15 @@ public class KitSnowman extends SmashKit new Perk[] { - new PerkSmashStats(6, 1.4, 0.25, 6), + new PerkSmashStats(6, 1.4, 0.4, 6), new PerkDoubleJump("Double Jump", 0.9, 0.9, false), - new PerkKnockbackSnow(1.5), + new PerkDamageSnow(3, 1.5), new PerkArcticAura(), new PerkBlizzard(), new PerkIcePath(), }, EntityType.SNOWMAN, - null, - Material.SNOW_BALL); + new ItemStack(Material.SNOW_BALL)); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSpider.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSpider.java index 96d691da4..44c64da46 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSpider.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitSpider.java @@ -4,6 +4,7 @@ import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; +import org.bukkit.inventory.ItemStack; import mineplex.core.common.util.C; import mineplex.core.disguise.disguises.DisguiseSpider; @@ -35,8 +36,7 @@ public class KitSpider extends SmashKit new PerkWebShot(), }, EntityType.SPIDER, - null, - Material.STRING); + new ItemStack(Material.WEB)); } @Override @@ -75,6 +75,7 @@ public class KitSpider extends SmashKit new String[] { ChatColor.RESET + "While crouching, you stick to walls.", + ChatColor.RESET + "", ChatColor.RESET + "Grasping onto a wall allows you to", ChatColor.RESET + "use Spider Leap again.", ChatColor.RESET + "", diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitWitherSkeleton.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitWitherSkeleton.java index 0c2801002..49cd72153 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitWitherSkeleton.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/standalone/smash/kits/KitWitherSkeleton.java @@ -4,15 +4,17 @@ import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; +import org.bukkit.entity.Skeleton.SkeletonType; import org.bukkit.inventory.ItemStack; import mineplex.core.common.util.C; -import mineplex.core.disguise.disguises.DisguiseSpider; +import mineplex.core.disguise.disguises.DisguiseSkeleton; import mineplex.core.itemstack.ItemStackFactory; import nautilus.game.arcade.ArcadeManager; import nautilus.game.arcade.kit.KitAvailability; import nautilus.game.arcade.kit.Perk; import nautilus.game.arcade.kit.SmashKit; +import nautilus.game.arcade.kit.perks.PerkComingSoon; import nautilus.game.arcade.kit.perks.PerkDoubleJump; import nautilus.game.arcade.kit.perks.PerkSmashStats; @@ -20,7 +22,7 @@ public class KitWitherSkeleton extends SmashKit { public KitWitherSkeleton(ArcadeManager manager) { - super(manager, ChatColor.RED + "Wither Skeleton", KitAvailability.Blue, + super(manager, "Wither Skeleton", KitAvailability.Green, new String[] { @@ -28,8 +30,9 @@ public class KitWitherSkeleton extends SmashKit new Perk[] { - new PerkSmashStats(7, 1.6, 0.25, 7), + new PerkSmashStats(7, 1.6, 0.25, 7.5), new PerkDoubleJump("Double Jump", 0.9, 0.9, false), + new PerkComingSoon(), }, EntityType.SKELETON, new ItemStack(Material.IRON_SWORD)); @@ -39,7 +42,7 @@ public class KitWitherSkeleton extends SmashKit public void GiveItems(Player player) { player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_SWORD, (byte)0, 1, - C.cYellow + C.Bold + "Hold/Release Block" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "???", + C.cYellow + C.Bold + "Hold/Release Block" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Coming Soon...", new String[] { ChatColor.RESET + "", @@ -47,7 +50,7 @@ public class KitWitherSkeleton extends SmashKit })); player.getInventory().addItem(ItemStackFactory.Instance.CreateStack(Material.IRON_AXE, (byte)0, 1, - C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "???", + C.cYellow + C.Bold + "Right-Click" + C.cWhite + C.Bold + " - " + C.cGreen + C.Bold + "Coming Soon...", new String[] { ChatColor.RESET + "", @@ -56,13 +59,14 @@ public class KitWitherSkeleton extends SmashKit player.getInventory().setHelmet(ItemStackFactory.Instance.CreateStack(Material.IRON_HELMET)); player.getInventory().setChestplate(ItemStackFactory.Instance.CreateStack(Material.IRON_CHESTPLATE)); - player.getInventory().setLeggings(ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_LEGGINGS)); + player.getInventory().setLeggings(ItemStackFactory.Instance.CreateStack(Material.IRON_LEGGINGS)); player.getInventory().setBoots(ItemStackFactory.Instance.CreateStack(Material.IRON_BOOTS)); //Disguise - DisguiseSpider disguise = new DisguiseSpider(player); + DisguiseSkeleton disguise = new DisguiseSkeleton(player); disguise.SetName(C.cYellow + player.getName()); disguise.SetCustomNameVisible(true); + disguise.SetSkeletonType(SkeletonType.WITHER); Manager.GetDisguise().disguise(disguise); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/Kit.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/Kit.java index 9577595ec..116dc9342 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/Kit.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/Kit.java @@ -34,7 +34,7 @@ public abstract class Kit implements Listener protected Material _displayItem; - public Kit(ArcadeManager manager, String name, KitAvailability kitAvailability, String[] kitDesc, Perk[] kitPerks, EntityType entityType, ItemStack itemInHand, Material displayItem) + public Kit(ArcadeManager manager, String name, KitAvailability kitAvailability, String[] kitDesc, Perk[] kitPerks, EntityType entityType, ItemStack itemInHand) { Manager = manager; @@ -49,12 +49,10 @@ public abstract class Kit implements Listener _entityType = entityType; _itemInHand = itemInHand; - _displayItem = displayItem; - } - - public Kit(ArcadeManager manager, String name, KitAvailability kitAvailability, String[] kitDesc, Perk[] kitPerks, EntityType entityType, ItemStack itemInHand) - { - this(manager, name, kitAvailability, kitDesc, kitPerks, entityType, itemInHand, itemInHand.getType()); + + _displayItem = Material.BOOK; + if (itemInHand != null) + _displayItem = itemInHand.getType(); } public String GetFormattedName() diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/SmashKit.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/SmashKit.java index f36057093..58a5ef0b7 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/SmashKit.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/SmashKit.java @@ -11,27 +11,19 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; public abstract class SmashKit extends Kit -{ - +{ public SmashKit(ArcadeManager manager, String name, KitAvailability kitAvailability, String[] kitDesc, Perk[] kitPerks, EntityType entityType, ItemStack itemInHand) { super(manager, name, kitAvailability, kitDesc, kitPerks, entityType, itemInHand); } - - public SmashKit(ArcadeManager manager, String name, - KitAvailability kitAvailability, String[] kitDesc, Perk[] kitPerks, - EntityType entityType, ItemStack itemInHand, Material displayItem) - { - super(manager, name, kitAvailability, kitDesc, kitPerks, entityType, itemInHand, displayItem); - } public void DisplayDesc(Player player) { for (int i=0 ; i<3 ; i++) UtilPlayer.message(player, ""); - + UtilPlayer.message(player, ArcadeFormat.Line); UtilPlayer.message(player, "§aKit - §f§l" + GetName()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkComingSoon.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkComingSoon.java new file mode 100644 index 000000000..241dd530e --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkComingSoon.java @@ -0,0 +1,15 @@ +package nautilus.game.arcade.kit.perks; + +import mineplex.core.common.util.C; +import nautilus.game.arcade.kit.Perk; + +public class PerkComingSoon extends Perk +{ + public PerkComingSoon() + { + super("Digger", new String[] + { + C.cRed + C.Bold + "COMING SOON...", + }); + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDamageSnow.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDamageSnow.java new file mode 100644 index 000000000..be04f5e6b --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDamageSnow.java @@ -0,0 +1,45 @@ +package nautilus.game.arcade.kit.perks; + +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; + +import mineplex.minecraft.game.core.damage.CustomDamageEvent; +import mineplex.core.common.util.C; +import nautilus.game.arcade.kit.Perk; + +public class PerkDamageSnow extends Perk +{ + private int _damage; + private double _knockback; + + public PerkDamageSnow(int damage, double knockback) + { + super("Snow Attack", new String[] + { + C.cGray + "+" + damage + " Damage and +" + (int)((knockback-1)*100) + "% Knockback to enemies on snow.", + }); + + _damage = damage; + _knockback = knockback; + } + + @EventHandler(priority = EventPriority.HIGH) + public void Knockback(CustomDamageEvent event) + { + if (event.GetDamageeEntity().getLocation().getBlock().getTypeId() != 78) + return; + + Player damager = event.GetDamagerPlayer(true); + if (damager == null) return; + + if (!Kit.HasKit(damager)) + return; + + if (!Manager.IsAlive(damager)) + return; + + event.AddMod(damager.getName(), GetName(), _damage, false); + event.AddKnockback("Knockback Snow", _knockback); + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDoubleJumpHorse.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDoubleJumpHorse.java new file mode 100644 index 000000000..13e1db1ee --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkDoubleJumpHorse.java @@ -0,0 +1,84 @@ +package nautilus.game.arcade.kit.perks; + +import org.bukkit.Effect; +import org.bukkit.GameMode; +import org.bukkit.block.BlockFace; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.player.PlayerToggleFlightEvent; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.UtilAction; +import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilEnt; +import mineplex.core.common.util.UtilServer; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import nautilus.game.arcade.kit.Perk; + +public class PerkDoubleJumpHorse extends Perk +{ + public PerkDoubleJumpHorse() + { + super("Jumper", new String[] + { + C.cYellow + "Tap Jump Twice" + C.cGray + " to " + C.cGreen + "Double Jump" + }); + } + + @EventHandler + public void FlightHop(PlayerToggleFlightEvent event) + { + Player player = event.getPlayer(); + + if (!Kit.HasKit(player)) + return; + + if (player.getGameMode() == GameMode.CREATIVE) + return; + + event.setCancelled(true); + player.setFlying(false); + + //Disable Flight + player.setAllowFlight(false); + + //Velocity + if (player.getVehicle() == null) + UtilAction.velocity(player, player.getLocation().getDirection(), 1.2, true, 1.2, 0, 1.2, true); + else + UtilAction.velocity(player.getVehicle(), player.getLocation().getDirection(), 0.8, true, 0.8, 0, 0.8, true); + + //Sound + player.getWorld().playEffect(player.getLocation(), Effect.BLAZE_SHOOT, 0); + } + + @EventHandler + public void FlightUpdate(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + for (Player player : UtilServer.getPlayers()) + { + if (player.getGameMode() == GameMode.CREATIVE) + continue; + + if (!Kit.HasKit(player)) + continue; + + + + if (player.getVehicle() == null) + { + if (UtilEnt.isGrounded(player) || UtilBlock.solid(player.getLocation().getBlock().getRelative(BlockFace.DOWN))) + player.setAllowFlight(true); + } + else + { + if (UtilEnt.isGrounded(player.getVehicle()) || UtilBlock.solid(player.getVehicle().getLocation().getBlock().getRelative(BlockFace.DOWN))) + player.setAllowFlight(true); + } + } + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkHorseKick.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkHorseKick.java new file mode 100644 index 000000000..60be0b92b --- /dev/null +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkHorseKick.java @@ -0,0 +1,164 @@ +package nautilus.game.arcade.kit.perks; + +import java.util.HashMap; + +import org.bukkit.Location; +import org.bukkit.craftbukkit.v1_6_R2.entity.CraftHorse; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Horse; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.block.Action; +import org.bukkit.event.entity.EntityDamageEvent.DamageCause; +import org.bukkit.event.player.PlayerInteractEvent; + +import mineplex.core.common.util.C; +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilBlock; +import mineplex.core.common.util.UtilEnt; +import mineplex.core.common.util.UtilMath; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.common.util.UtilServer; +import mineplex.core.common.util.UtilTime; +import mineplex.core.recharge.Recharge; +import mineplex.core.updater.UpdateType; +import mineplex.core.updater.event.UpdateEvent; +import mineplex.minecraft.game.core.damage.CustomDamageEvent; +import nautilus.game.arcade.kit.Perk; + +public class PerkHorseKick extends Perk +{ + private HashMap _active = new HashMap(); + + public PerkHorseKick() + { + super("Horse Kick", new String[] + { + C.cYellow + "Hold Block" + C.cGray + " to use " + C.cGreen + "Horse Kick" + }); + } + + + @EventHandler + public void Activate(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 (!event.getPlayer().getItemInHand().getType().toString().contains("_AXE")) + return; + + Player player = event.getPlayer(); + + if (!Kit.HasKit(player)) + return; + + if (!Recharge.Instance.use(player, GetName(), 6000, true)) + return; + + Horse horse = GetHorse(player); + + //Horse Skill + if (horse != null) + { + //Animation + _active.put(player, System.currentTimeMillis()); + ((CraftHorse)horse).getHandle().p(true); + + //Attack + Location loc = horse.getLocation().add(horse.getLocation().getDirection().multiply(1.5)); + + for (Entity other : horse.getWorld().getEntities()) + { + if (!(other instanceof LivingEntity)) + continue; + + if (other.equals(horse.getPassenger())) + continue; + + if (other.equals(horse)) + continue; + + if (UtilMath.offset(loc, other.getLocation()) > 2) + continue; + + //Damage Event + Manager.GetDamage().NewDamageEvent((LivingEntity)other, (LivingEntity)horse.getPassenger(), null, + DamageCause.ENTITY_ATTACK, 8, true, false, false, + UtilEnt.getName(horse.getPassenger()), GetName()); + } + + UtilPlayer.message(player, F.main("Skill", "You used " + F.skill(GetName()) + ".")); + } + //Player Skill + else + { + + } + } + + @EventHandler + public void Update(UpdateEvent event) + { + if (event.getType() != UpdateType.TICK) + return; + + for (Player cur : UtilServer.getPlayers()) + { + if (!_active.containsKey(cur)) + continue; + + Horse horse = GetHorse(cur); + + //Horse Skill + if (horse != null) + { + if (horse.getPassenger() == null || !(horse.getPassenger() instanceof LivingEntity)) + { + _active.remove(cur); + ((CraftHorse)horse).getHandle().p(false); + continue; + } + + if (UtilTime.elapsed(_active.get(cur), 1000)) + { + _active.remove(cur); + ((CraftHorse)horse).getHandle().p(false); + continue; + } + } + //Player Skill + else + { + + } + } + } + + public Horse GetHorse(Player player) + { + if (player.getVehicle() == null) + return null; + + if (player.getVehicle() instanceof Horse) + return (Horse)player.getVehicle(); + + return null; + } + + @EventHandler + public void Knockback(CustomDamageEvent event) + { + if (event.GetReason() == null || !event.GetReason().contains(GetName())) + return; + + event.AddKnockback(GetName(), 2); + } +} diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkLeap.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkLeap.java index c179ac777..b2cd442a3 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkLeap.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkLeap.java @@ -1,6 +1,8 @@ package nautilus.game.arcade.kit.perks; import org.bukkit.Effect; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Horse; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.block.Action; @@ -62,7 +64,13 @@ public class PerkLeap extends Perk if (!Recharge.Instance.use(player, _name, _recharge, true)) return; - UtilAction.velocity(player, _power, 0.2, _heightMax, true); + Entity ent = player; + + if (player.getVehicle() != null) + if (player.getVehicle() instanceof Horse) + ent = player.getVehicle(); + + UtilAction.velocity(ent, _power, 0.2, _heightMax, true); player.setFallDistance(0); UtilPlayer.message(player, F.main("Skill", "You used " + F.skill(_name) + ".")); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkRopedArrow.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkRopedArrow.java index d8aab9d64..4232f8b7a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkRopedArrow.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkRopedArrow.java @@ -28,18 +28,18 @@ import nautilus.game.arcade.kit.Perk; public class PerkRopedArrow extends Perk { private HashSet _arrows = new HashSet(); - + private String _name; private double _power; private long _recharge; - + public PerkRopedArrow(String name, double power, long recharge) { super(name, new String[] { C.cYellow + "Left-Click" + C.cGray + " with Bow to " + C.cGreen + name }); - + _name = name; _power = power; _recharge = recharge; @@ -53,26 +53,35 @@ public class PerkRopedArrow extends Perk if (event.getPlayer().getItemInHand() == null) return; - + if (event.getPlayer().getItemInHand().getType() != Material.BOW) return; - + Player player = event.getPlayer(); - + if (!Kit.HasKit(player)) return; - + if (!Recharge.Instance.use(player, _name, _recharge, true)) return; - + + //Arrow Arrow arrow = player.launchProjectile(Arrow.class); arrow.setVelocity(player.getLocation().getDirection().multiply(2.4 * _power)); _arrows.add(arrow); + + + //Leash + //Bat bat = player.getWorld().spawn(player.getEyeLocation(), Bat.class); + //bat.addPotionEffect(new PotionEffect(PotionEffectType.INVISIBILITY, 100000, 100000)); + //bat.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 100000, 100000)); + //bat.setLeashHolder(arrow); + //Inform UtilPlayer.message(player, F.main("Game", "You fired " + F.skill(_name) + ".")); } - + @EventHandler public void Hit(ProjectileHitEvent event) { @@ -89,7 +98,7 @@ public class PerkRopedArrow extends Perk Vector vec = UtilAlg.getTrajectory(proj.getShooter(), proj); double mult = (proj.getVelocity().length() / 3d); - + //Action UtilAction.velocity(proj.getShooter(), vec, 0.4 + mult * _power, false, 0, 0.6 * mult * _power, 1.2 * mult * _power, true); @@ -103,11 +112,11 @@ public class PerkRopedArrow extends Perk { if (event.getType() != UpdateType.SEC) return; - + for (Iterator arrowIterator = _arrows.iterator(); arrowIterator.hasNext();) { Entity arrow = arrowIterator.next(); - + if (!arrow.isValid()) arrowIterator.remove(); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java index 2b136199d..5d10eafd3 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameLobbyManager.java @@ -497,6 +497,9 @@ public class GameLobbyManager implements IPacketRunnable, Listener if (_teams.containsKey(ent)) continue; + if (ent.getPassenger() != null) + continue; + ent.remove(); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java index 0eb7a1bd8..558623da4 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/MiscManager.java @@ -106,8 +106,9 @@ public class MiscManager implements Listener if (Manager.IsAlive(player)) continue; - UtilPlayer.message(player, C.cYellow + C.Bold + "You are out of the game, but " + C.cRed + C.Bold + "DON'T QUIT" + C.cYellow + C.Bold + "!"); - UtilPlayer.message(player, C.cYellow + C.Bold + "The next game will be starting soon..."); + UtilPlayer.message(player, " "); + UtilPlayer.message(player, C.cWhite + C.Bold + "You are out of the game, but " + C.cGold + C.Bold + "DON'T QUIT" + C.cWhite + C.Bold + "!"); + UtilPlayer.message(player, C.cWhite + C.Bold + "The next game will be starting soon..."); } }