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.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.craftbukkit.v1_7_R1.entity.CraftLivingEntity;
@ -105,6 +106,20 @@ public class DamageManager extends MiniPlugin
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)
{
@ -259,6 +274,10 @@ public class DamageManager extends MiniPlugin
//Effect
event.GetDamageeEntity().playEffect(EntityEffect.HURT);
//Sticky Arrow
if (event.GetCause() == DamageCause.PROJECTILE)
((CraftLivingEntity)event.GetDamageeEntity()).getHandle().p(((CraftLivingEntity)event.GetDamageeEntity()).getHandle().aZ() + 1);
//Knockback
double knockback = event.GetDamage();
if (knockback < 2) knockback = 2;

View File

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