Added arrows sticking in you.

Removed bouncing arrows.
This commit is contained in:
Jonathan Williams 2014-04-09 02:03:19 -07:00
parent bedabd84cc
commit ec29c66d1c
2 changed files with 22 additions and 0 deletions

View File

@ -23,6 +23,7 @@ import net.minecraft.server.v1_7_R1.EntityLiving;
import org.bukkit.EntityEffect; import org.bukkit.EntityEffect;
import org.bukkit.GameMode; import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.Sound; import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_7_R1.entity.CraftLivingEntity; import org.bukkit.craftbukkit.v1_7_R1.entity.CraftLivingEntity;
@ -105,6 +106,20 @@ public class DamageManager extends MiniPlugin
event.setCancelled(true); event.setCancelled(true);
} }
@EventHandler(priority = EventPriority.HIGHEST)
public void removeDemArrowsCrazyMan(EntityDamageEvent event)
{
if (event.isCancelled())
{
Projectile projectile = GetProjectile(event);
if (projectile instanceof Arrow)
{
projectile.teleport(new Location(projectile.getWorld(), 0, -200, 0));
projectile.remove();
}
}
}
/* /*
private boolean GoldPower(LivingEntity damager) private boolean GoldPower(LivingEntity damager)
{ {
@ -259,6 +274,10 @@ public class DamageManager extends MiniPlugin
//Effect //Effect
event.GetDamageeEntity().playEffect(EntityEffect.HURT); event.GetDamageeEntity().playEffect(EntityEffect.HURT);
//Sticky Arrow
if (event.GetCause() == DamageCause.PROJECTILE)
((CraftLivingEntity)event.GetDamageeEntity()).getHandle().p(((CraftLivingEntity)event.GetDamageeEntity()).getHandle().aZ() + 1);
//Knockback //Knockback
double knockback = event.GetDamage(); double knockback = event.GetDamage();
if (knockback < 2) knockback = 2; if (knockback < 2) knockback = 2;

View File

@ -502,6 +502,9 @@ public class ArcadeManager extends MiniPlugin implements IRelation
((CraftPlayer)player).getHandle().spectating = false; ((CraftPlayer)player).getHandle().spectating = false;
((CraftPlayer)player).getHandle().l = true; ((CraftPlayer)player).getHandle().l = true;
// Arrows go bye bye.
((CraftPlayer)player).getHandle().p(0);
GetCondition().EndCondition(player, ConditionType.CLOAK, null); GetCondition().EndCondition(player, ConditionType.CLOAK, null);
HubClock(player); HubClock(player);