Paper icon indicating copy to clipboard operation
Paper copied to clipboard

Fixed NullPointerException

Open NonSwag opened this issue 6 months ago • 2 comments

I encountered this NPE after dying in a world, unloading that specific world, and another plugin trying to access the last death location,

getLevel returns nullable but toBukkit(BlockPos, Level) doesnt allow null values

NonSwag avatar Jun 08 '25 14:06 NonSwag

side note maybe improvement a little the "getWorld" in the Location method because not sure if is just me but the descriptions is like for this case i can still get the world but with the "IllegalArgumentException" but no, because that location comes after the location was created, unless i get that when player dies and use later when the world was unloaded.

Doc94 avatar Jun 08 '25 14:06 Doc94

Converted to draft for now, since this will cause an IllegalArgumentException when getting the world a converted location

NonSwag avatar Jun 08 '25 19:06 NonSwag