- Joined
- Nov 18, 2013
- Messages
- 120
- Thread Author
- #1
When I run this code it sometimes throws an NPE and I can't figure out why
Code:
GameObject obelisk = GameObjects.newQuery().names("Small obelisk").results().first();
if (obelisk != null && !obelisk.isVisible()) {
Traversal.getDefaultWeb().getPathBuilder().buildTo(obelisk.getPosition()).step();
Camera.passivelyTurnTo(obelisk);
}