Merge branch 'master' of ssh://dev1.mineplex.com:7999/min/mineplex

This commit is contained in:
Chiss 2014-04-12 18:25:59 +10:00
commit ecc40bda47
7 changed files with 15 additions and 10 deletions

Binary file not shown.

View File

@ -3,6 +3,7 @@ package net.minecraft.server.v1_7_R2;
import java.util.ArrayList;
import java.util.Iterator;
// CraftBukkit start
import org.bukkit.craftbukkit.v1_7_R2.event.CraftEventFactory;
import org.bukkit.event.entity.EntityDamageEvent;
@ -62,6 +63,14 @@ public class EntityFallingBlock extends Entity {
return !this.dead && !spectating;
}
@Override
public boolean damageEntity(DamageSource damagesource, float f)
{
CraftEventFactory.handleEntityDamageEvent(this, damagesource, f);
return true;
}
public void h() {
if (this.id.getMaterial() == Material.AIR) {
this.die();

View File

@ -900,6 +900,7 @@ public abstract class EntityHuman extends EntityLiving implements ICommandListen
}
if (f > 0.0F || f1 > 0.0F) {
boolean flag = this.fallDistance > 0.0F && !this.onGround && !this.h_() && !this.L() && !this.hasEffect(MobEffectList.BLINDNESS) && this.vehicle == null && entity instanceof EntityLiving;
if (flag && f > 0.0F) {

View File

@ -52,8 +52,8 @@ public abstract class GravityObject
Base.setHealth(60);
Bat = new DisguiseBat(Base);
Bat.setSitting(false);
Host.Manager.GetDisguise().disguise(Bat);
Bat.setSitting(true);
//Host.Manager.GetDisguise().disguise(Bat);
UtilEnt.Vegetate(Base, true);
UtilEnt.ghost(Base, true, true);
@ -212,6 +212,6 @@ public abstract class GravityObject
public void SetMovingBat(boolean moving)
{
Bat.setSitting(!moving);
Host.Manager.GetDisguise().updateDisguise(Bat);
//Host.Manager.GetDisguise().updateDisguise(Bat);
}
}

View File

@ -104,12 +104,6 @@ public class GravityPlayer extends GravityObject
public void KickOff(Player player)
{
if (!Ent.equals(player))
return;
if (!Bat.isSitting() && !NearBlock())
return;
GrabDelay = System.currentTimeMillis();
AddVelocity(player.getLocation().getDirection().multiply(0.5), 0.5);

View File

@ -456,6 +456,7 @@ public class HideSeek extends TeamGame
@EventHandler
public void FallingBlockDamage(EntityDamageEvent event)
{
System.out.println("Damage event.");
if (!(event instanceof EntityDamageByEntityEvent))
return;