BarAPI icon indicating copy to clipboard operation
BarAPI copied to clipboard

getDragonLocation() throws a NullPointerException

Open stefvanschie opened this issue 9 years ago • 3 comments

Hey,

I got this error when using your plugin: http://pastebin.com/vva7KtEF

Was using the bar as a countdown and this happened when he was at approximately half his health. The timer was set to 30 seconds.

EDIT: Got it again, new error log: http://pastebin.com/FNPFPu6k

stefvanschie avatar Sep 22 '15 15:09 stefvanschie

I think I know what's causing this to happen. In the minigame I'm testing (which uses your api) I have boundaries and when I walk into them and get teleported back with a very specific timing, it returns null. I have no idea how to fix it though.

stefvanschie avatar Feb 20 '16 08:02 stefvanschie

Interesting. I haven't been able to reproduce this. Are you moving them to a different unloaded chunk?

confuser avatar Feb 20 '16 12:02 confuser

No they get teleported to the previous location, so they can't escape out of the boundaries.

EDIT: I'm still not entirely sure if this is the exact problem. It happened and I saw I was getting teleported back due to the boundaries. I have no idea if that was just by accident.

stefvanschie avatar Feb 20 '16 13:02 stefvanschie