Skip to content

Commit

Permalink
a dead player is not a valid entity
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Sep 24, 2019
1 parent 1657beb commit ed03723
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -1131,7 +1131,7 @@ public ObjectTag run(Attribute attribute, ObjectTag object) {
registerTag("location", new TagRunnable.ObjectForm() {
@Override
public ObjectTag run(Attribute attribute, ObjectTag object) {
if (((PlayerTag) object).isOnline()) {
if (((PlayerTag) object).isOnline() && !((PlayerTag) object).getPlayerEntity().isDead()) {
return new EntityTag(((PlayerTag) object).getPlayerEntity()).getObjectAttribute(attribute);
}
return ((PlayerTag) object).getLocation().getObjectAttribute(attribute.fulfill(1));
Expand Down

0 comments on commit ed03723

Please sign in to comment.