diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/RopedArrow.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/RopedArrow.java index c18f42870..524aca959 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/RopedArrow.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/RopedArrow.java @@ -112,11 +112,11 @@ public class RopedArrow extends SkillActive int level = getLevel(((Player)proj.getShooter())); if (level == 0) return; - Vector vec = UtilAlg.getTrajectory(proj.getShooter(), proj); + Vector vec = UtilAlg.getTrajectory((Entity)proj.getShooter(), proj); double mult = (proj.getVelocity().length() / 3d); //Action - UtilAction.velocity(proj.getShooter(), vec, + UtilAction.velocity((Entity)proj.getShooter(), vec, 0.4 + mult, false, 0, 0.3 * mult, 1.2 * mult, true); //Effect diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Sharpshooter.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Sharpshooter.java index 773a005a8..8dc0e0037 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Sharpshooter.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/Skill/Ranger/Sharpshooter.java @@ -83,7 +83,7 @@ public class Sharpshooter extends Skill _hitCount.put(player, limit); //Inform - UtilPlayer.message(projectile.getShooter(), F.main(GetClassType().name(), GetName() + ": " + + UtilPlayer.message((Entity)projectile.getShooter(), F.main(GetClassType().name(), GetName() + ": " + F.elem(_hitCount.get(player) + " Consecutive Hits") + C.cGray + " (" + F.skill("+"+ (limit * 2) + "Damage" ) + C.cGray + ")" ) ); } else diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/salespackage/ItemSalesPackage.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/salespackage/ItemSalesPackage.java index 842a49b90..625920e4b 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/salespackage/ItemSalesPackage.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/shop/salespackage/ItemSalesPackage.java @@ -14,6 +14,7 @@ public class ItemSalesPackage extends SalesPackageBase super("Champions " + item.GetName(), Material.BOOK, (byte)0, item.GetDesc(), item.GetGemCost()); Free = item.isFree(); KnownPackage = false; + CurrencyCostMap.put(CurrencyType.Gems, item.GetGemCost()); } @Override diff --git a/Plugins/Nautilus.Core.CraftBukkit/src/org/bukkit/entity/Projectile.java b/Plugins/Nautilus.Core.CraftBukkit/src/org/bukkit/entity/Projectile.java index 289feae9e..d57fe8140 100644 --- a/Plugins/Nautilus.Core.CraftBukkit/src/org/bukkit/entity/Projectile.java +++ b/Plugins/Nautilus.Core.CraftBukkit/src/org/bukkit/entity/Projectile.java @@ -2,15 +2,55 @@ package org.bukkit.entity; import org.bukkit.projectiles.ProjectileSource; -public abstract interface Projectile extends Entity -{ +/** + * Represents a shootable entity. + */ +public interface Projectile extends Entity { + + /** + * This method exists for legacy reasons to provide backwards + * compatibility. It will not exist at runtime and should not be used + * under any circumstances. + */ @Deprecated - public abstract LivingEntity getShooter(); + public LivingEntity _INVALID_getShooter(); + /** + * Retrieve the shooter of this projectile. + * + * @return the {@link ProjectileSource} that shot this projectile + */ + public ProjectileSource getShooter(); + + /** + * This method exists for legacy reasons to provide backwards + * compatibility. It will not exist at runtime and should not be used + * under any circumstances. + */ @Deprecated - public abstract void setShooter(LivingEntity paramLivingEntity); + public void _INVALID_setShooter(LivingEntity shooter); - public abstract boolean doesBounce(); + /** + * Set the shooter of this projectile. + * + * @param source the {@link ProjectileSource} that shot this projectile + */ + public void setShooter(ProjectileSource source); - public abstract void setBounce(boolean paramBoolean); -} + /** + * Determine if this projectile should bounce or not when it hits. + *

+ * If a small fireball does not bounce it will set the target on fire. + * + * @return true if it should bounce. + */ + public boolean doesBounce(); + + /** + * Set whether or not this projectile should bounce or not when it hits + * something. + * + * @param doesBounce whether or not it should bounce. + */ + public void setBounce(boolean doesBounce); +} \ No newline at end of file diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java index 1e01d1475..e06b03772 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -810,13 +810,6 @@ public class ArcadeManager extends MiniPlugin implements IRelation } } - @EventHandler - public void TeleportLog(PlayerTeleportEvent event) - { - System.out.println("Teleporting: " + event.getPlayer().getName() + " to " - + event.getTo().getWorld().getWorldFolder().getName()); - } - public InventoryManager getInventoryManager() { return _inventoryManager; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castlesiege/CastleSiege.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castlesiege/CastleSiege.java index 74e64806e..e204967ff 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castlesiege/CastleSiege.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/castlesiege/CastleSiege.java @@ -647,7 +647,7 @@ public class CastleSiege extends TeamGame int damage = (int) (5 * (event.getEntity().getVelocity().length() / 3d)); //Damage Event - Manager.GetDamage().NewDamageEvent(player, event.getEntity().getShooter(), event.getEntity(), + Manager.GetDamage().NewDamageEvent(player, (LivingEntity)event.getEntity().getShooter(), event.getEntity(), DamageCause.CUSTOM, damage, true, false, false, null, GetName()); diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gravity/Gravity.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gravity/Gravity.java index 5e089847d..91df8eb87 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gravity/Gravity.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/gravity/Gravity.java @@ -14,7 +14,9 @@ import org.bukkit.FireworkEffect.Type; import org.bukkit.block.Block; import org.bukkit.craftbukkit.v1_7_R4.entity.CraftFallingSand; import org.bukkit.entity.Arrow; +import org.bukkit.entity.Entity; import org.bukkit.entity.FallingBlock; +import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.entity.Projectile; import org.bukkit.entity.Slime; @@ -568,9 +570,9 @@ public class Gravity extends SoloGame if (obj.Ent instanceof Player) { //Damage Event - Manager.GetDamage().NewDamageEvent((Player)obj.Ent, proj.getShooter(), null, + Manager.GetDamage().NewDamageEvent((Player)obj.Ent, (LivingEntity)proj.getShooter(), null, DamageCause.CUSTOM, 1, false, true, true, - UtilEnt.getName(proj.getShooter()), "Sonic Blast"); + UtilEnt.getName((Entity)proj.getShooter()), "Sonic Blast"); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/HideSeek.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/HideSeek.java index 64ddf7a19..4dd1abca9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/HideSeek.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/hideseek/HideSeek.java @@ -479,7 +479,7 @@ public class HideSeek extends TeamGame if (eventEE.getDamager() instanceof Projectile) { proj = (Projectile)eventEE.getDamager(); - damager = proj.getShooter(); + damager = (LivingEntity)proj.getShooter(); } else if (eventEE.getDamager() instanceof LivingEntity) { diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/runner/kits/KitFrosty.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/runner/kits/KitFrosty.java index 4ff4ce99d..51b000027 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/runner/kits/KitFrosty.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/runner/kits/KitFrosty.java @@ -3,6 +3,7 @@ package nautilus.game.arcade.game.games.runner.kits; import org.bukkit.EntityEffect; import org.bukkit.Material; import org.bukkit.entity.EntityType; +import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.entity.Snowball; import org.bukkit.event.EventHandler; @@ -52,6 +53,6 @@ public class KitFrosty extends Kit event.GetDamageeEntity().playEffect(EntityEffect.HURT); - Manager.GetCondition().Factory().Slow("Snowball Slow", event.GetDamageeEntity(), event.GetProjectile().getShooter(), 2, 1, false, false, true, false); + Manager.GetCondition().Factory().Slow("Snowball Slow", event.GetDamageeEntity(), (LivingEntity)event.GetProjectile().getShooter(), 2, 1, false, false, true, false); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkEggGun.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkEggGun.java index 025aec360..6e39e8143 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkEggGun.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkEggGun.java @@ -4,6 +4,7 @@ import java.util.HashMap; import org.bukkit.Sound; import org.bukkit.entity.Egg; +import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.block.Action; @@ -118,9 +119,9 @@ public class PerkEggGun extends Perk Egg egg = (Egg)event.GetProjectile(); //Damage Event - Manager.GetDamage().NewDamageEvent(event.GetDamageeEntity(), egg.getShooter(), egg, + Manager.GetDamage().NewDamageEvent(event.GetDamageeEntity(), (LivingEntity)egg.getShooter(), egg, DamageCause.PROJECTILE, 1, true, true, false, - UtilEnt.getName(egg.getShooter()), GetName()); + UtilEnt.getName((LivingEntity)egg.getShooter()), GetName()); event.GetDamageeEntity().setVelocity(new Vector(0,0,0)); } 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 9f1593a1d..5be3169b9 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 @@ -7,6 +7,7 @@ import org.bukkit.Material; import org.bukkit.Sound; import org.bukkit.entity.Arrow; import org.bukkit.entity.Entity; +import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.entity.Projectile; import org.bukkit.event.EventHandler; @@ -89,11 +90,11 @@ public class PerkRopedArrow extends Perk if (!(proj.getShooter() instanceof Player)) return; - Vector vec = UtilAlg.getTrajectory(proj.getShooter(), proj); + Vector vec = UtilAlg.getTrajectory((LivingEntity)proj.getShooter(), proj); double mult = (proj.getVelocity().length() / 3d); //Action - UtilAction.velocity(proj.getShooter(), vec, + UtilAction.velocity((LivingEntity)proj.getShooter(), vec, 0.4 + mult * _power, false, 0, 0.6 * mult * _power, 1.2 * mult * _power, true); //Effect diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitchPotion.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitchPotion.java index 60a991b67..70d0b436f 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitchPotion.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitchPotion.java @@ -3,6 +3,7 @@ package nautilus.game.arcade.kit.perks; import java.util.ArrayList; import java.util.Iterator; +import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.entity.Projectile; import org.bukkit.entity.ThrownPotion; @@ -25,7 +26,6 @@ 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 PerkWitchPotion extends Perk @@ -89,9 +89,9 @@ public class PerkWitchPotion extends Perk continue; //Damage Event - Manager.GetDamage().NewDamageEvent(player, event.getEntity().getShooter(), null, + Manager.GetDamage().NewDamageEvent(player, (LivingEntity)event.getEntity().getShooter(), null, DamageCause.CUSTOM, 5, true, true, false, - UtilEnt.getName(event.getEntity().getShooter()), GetName()); + UtilEnt.getName((LivingEntity)event.getEntity().getShooter()), GetName()); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitherSkull.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitherSkull.java index 40abaee6f..70484d69c 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitherSkull.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/kit/perks/PerkWitherSkull.java @@ -132,7 +132,7 @@ public class PerkWitherSkull extends Perk WitherSkull skull = (WitherSkull)event.getEntity(); - Explode(skull, event.getLocation(), skull.getShooter()); + Explode(skull, event.getLocation(), (LivingEntity)skull.getShooter()); } @EventHandler(priority = EventPriority.LOWEST) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java index 605e3956d..9cf7dcdae 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameManager.java @@ -590,7 +590,7 @@ public class GameManager implements Listener player.leaveVehicle(); player.teleport(Manager.GetLobby().GetSpawn()); } - }, i*3); + }, i); } }