Does anyone knows how to fix this nullpointerexception? https://haste.nycode.de/gipicaxune.avrasm
Silvan
Does anyone knows how to fix this nullpointerexception? https://haste.nycode.de/gipicaxune.avrasm
Silvan
The world you are trying to load with your code (Bukkit.getWorld("myWorld");
) in class InventoryListener
in line 55
.
Before you handle optional information you should check if it exist.
Example:
if(Bukkit.getWorld("myWorld") == null) {
return;
}
Bukkit.getWorld("myWorld").//do something