Skip to content

Commit

Permalink
Possibly fix entity data bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 11, 2015
1 parent 00d9c11 commit b28d02e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -73,7 +73,7 @@ public boolean matches(ScriptContainer scriptContainer, String s) {
return false;
}

if (!item.equals("bow") && !tryItem(bow, item)){
if (!item.equals("bow") && !tryItem(bow, item)) {
return false;
}

Expand Down
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.server.v1_8_R3.Entity;
import net.minecraft.server.v1_8_R3.EntityHuman;
import net.minecraft.server.v1_8_R3.IWorldAccess;
import org.bukkit.entity.LivingEntity;

public class DenizenWorldAccess implements IWorldAccess {
@Override
Expand Down Expand Up @@ -48,6 +49,9 @@ public void b(Entity entity) {
if (Depends.citizens != null && CitizensAPI.getNPCRegistry().isNPC(entity.getBukkitEntity())) {
return;
}
if (entity.getBukkitEntity() instanceof LivingEntity && !((LivingEntity) entity.getBukkitEntity()).getRemoveWhenFarAway()) {
return;
}
EntityDespawnScriptEvent.instance.entity = new dEntity(entity.getBukkitEntity());
EntityDespawnScriptEvent.instance.cause = new Element("OTHER");
EntityDespawnScriptEvent.instance.cancelled = false;
Expand Down

0 comments on commit b28d02e

Please sign in to comment.