- Баллы
- 76
- Имя в Minecraft
- Blc_Dragon
Доброго времени суток, форумчане. Ловит NullPointer, хотя объект не null
null в строке
Когда отключаю из кода строки
то все пашет. Даже сообщение приходит. Т.е. игрок не null
В чем подвох?
Заранее спасибо
Java:
public class moveBullet extends BukkitRunnable{
private Player p;
private Firework Bullet;
public moveBullet(Player pl, Firework bul){
this.p=pl;
this.Bullet=bul;
}
final Vector vc = p.getLocation().getDirection();
Double y = vc.getY();
@Override
public void run() {
p.sendMessage("as"); //специально для проверки null
if (Bullet.isDead()){
cancel();
}
cancel();
}
}
Java:
final Vector vc = p.getLocation().getDirection();
Java:
final Vector vc = p.getLocation().getDirection();
Double y = vc.getY();
В чем подвох?
Заранее спасибо
