NifO_TOP Posted August 4, 2023 Posted August 4, 2023 (edited) Hello I encountered an error that I'm having trouble resolving. This is the error i got on console when i log the char into game Could not restore char data: java.lang.NullPointerException Edited August 4, 2023 by NifO_TOP screen Quote
Tryskell Posted August 13, 2023 Posted August 13, 2023 Provide the logs, it will give you details regarding the issue. For now simply check for "Could not restore char data" on your project, and revert or fix your customs on the given method. Basically you got a method call returning nothing ("null") while it should be set. Either you missed a != null check, or you messed up the logic. Eg. if you do player.getInventory().addItem but never set _inventory before on that Player, then it ends as NPE because getInventory() isn't set and returns null. So, null pointer exception. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.