diff options
author | Andrew Ardill <andrew.ardill@gmail.com> | 2011-01-21 16:54:30 +1100 |
---|---|---|
committer | Andrew Ardill <andrew.ardill@gmail.com> | 2011-01-21 16:54:30 +1100 |
commit | 1cbde901bacb7620e555d1725c95619641caba8e (patch) | |
tree | 60157572f1bff78ecd6ede7f9f443f138e01c9fe /src/main/java/net/minecraft/server/EntityPlayer.java | |
parent | 1dad7de4f34982efff946ec51ca576902d79bb8e (diff) | |
download | craftbukkit-1cbde901bacb7620e555d1725c95619641caba8e.tar craftbukkit-1cbde901bacb7620e555d1725c95619641caba8e.tar.gz craftbukkit-1cbde901bacb7620e555d1725c95619641caba8e.tar.lz craftbukkit-1cbde901bacb7620e555d1725c95619641caba8e.tar.xz craftbukkit-1cbde901bacb7620e555d1725c95619641caba8e.zip |
Entity audit. Adds checks for null entities, and adds conformity.
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityPlayer.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityPlayer.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index aa8a9ed3..4cc6e137 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -3,13 +3,13 @@ package net.minecraft.server; import java.util.List; import java.util.Random; -//CraftBukkit start +// CraftBukkit start import org.bukkit.craftbukkit.entity.CraftHumanEntity; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageEvent; import org.bukkit.event.entity.EntityDamageEvent.DamageCause; -//CraftBukkit end +// CraftBukkit end public abstract class EntityPlayer extends EntityLiving { @@ -51,10 +51,10 @@ public abstract class EntityPlayer extends EntityLiving { aR = 180F; Y = 20; aP = "/mob/char.png"; - //CraftBukkit start + // CraftBukkit start CraftServer server = ((WorldServer) this.l).getServer(); this.bukkitEntity = new CraftHumanEntity(server, this); - //CraftBukkit end + // CraftBukkit end } public void b_() { @@ -343,7 +343,7 @@ public abstract class EntityPlayer extends EntityLiving { if(entity instanceof EntityLiving) { CraftServer server = ((WorldServer) l).getServer(); org.bukkit.entity.Entity damager = this.getBukkitEntity(); - org.bukkit.entity.Entity damagee = entity.getBukkitEntity(); + org.bukkit.entity.Entity damagee = (entity == null)?null:entity.getBukkitEntity(); DamageCause damageType = EntityDamageEvent.DamageCause.ENTITY_ATTACK; int damageDone = i; |