NPE check for bed location.

This commit is contained in:
sigonasr2 2016-08-27 15:58:32 -05:00
parent 9deec24e98
commit 4038c1182e
2 changed files with 1 additions and 1 deletions

Binary file not shown.

View File

@ -43,7 +43,7 @@ public class DeathManager {
p.setVelocity(new Vector(0,0,0)); p.setVelocity(new Vector(0,0,0));
CustomDamage.removeIframe(p); CustomDamage.removeIframe(p);
Location loc = p.getLocation(); Location loc = p.getLocation();
loc.setY(p.getBedSpawnLocation().getY()); if (p.getBedSpawnLocation()!=null) {loc.setY(p.getBedSpawnLocation().getY());}
p.teleport(loc); p.teleport(loc);
}},1); }},1);
PlayerStructure pd = PlayerStructure.GetPlayerStructure(p); PlayerStructure pd = PlayerStructure.GetPlayerStructure(p);