Update CraftBukkit to Minecraft 1.7.2
This commit is contained in:
@@ -18,7 +18,7 @@ public class EntityEnderPearl extends EntityProjectile {
|
||||
|
||||
protected void a(MovingObjectPosition movingobjectposition) {
|
||||
if (movingobjectposition.entity != null) {
|
||||
movingobjectposition.entity.damageEntity(DamageSource.projectile(this, this.getShooter()), 0);
|
||||
movingobjectposition.entity.damageEntity(DamageSource.projectile(this, this.getShooter()), 0.0F);
|
||||
}
|
||||
|
||||
for (int i = 0; i < 32; ++i) {
|
||||
@@ -29,7 +29,7 @@ public class EntityEnderPearl extends EntityProjectile {
|
||||
if (this.getShooter() != null && this.getShooter() instanceof EntityPlayer) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) this.getShooter();
|
||||
|
||||
if (!entityplayer.playerConnection.disconnected && entityplayer.world == this.world) {
|
||||
if (entityplayer.playerConnection.b().d() && entityplayer.world == this.world) {
|
||||
// CraftBukkit start
|
||||
org.bukkit.craftbukkit.entity.CraftPlayer player = entityplayer.getBukkitEntity();
|
||||
org.bukkit.Location location = getBukkitEntity().getLocation();
|
||||
@@ -39,14 +39,14 @@ public class EntityEnderPearl extends EntityProjectile {
|
||||
PlayerTeleportEvent teleEvent = new PlayerTeleportEvent(player, player.getLocation(), location, PlayerTeleportEvent.TeleportCause.ENDER_PEARL);
|
||||
Bukkit.getPluginManager().callEvent(teleEvent);
|
||||
|
||||
if (!teleEvent.isCancelled() && !entityplayer.playerConnection.disconnected) {
|
||||
if (!teleEvent.isCancelled() && !entityplayer.playerConnection.isDisconnected()) {
|
||||
entityplayer.playerConnection.teleport(teleEvent.getTo());
|
||||
this.getShooter().fallDistance = 0.0F;
|
||||
|
||||
EntityDamageByEntityEvent damageEvent = new EntityDamageByEntityEvent(this.getBukkitEntity(), player, EntityDamageByEntityEvent.DamageCause.FALL, 5.0D);
|
||||
Bukkit.getPluginManager().callEvent(damageEvent);
|
||||
|
||||
if (!damageEvent.isCancelled() && !entityplayer.playerConnection.disconnected) {
|
||||
if (!damageEvent.isCancelled() && !entityplayer.playerConnection.isDisconnected()) {
|
||||
entityplayer.invulnerableTicks = -1; // Remove spawning invulnerability
|
||||
player.setLastDamageCause(damageEvent);
|
||||
entityplayer.damageEntity(DamageSource.FALL, (float) damageEvent.getDamage());
|
||||
|
||||
Reference in New Issue
Block a user