-1

Does anyone knows how to fix this nullpointerexception? https://haste.nycode.de/gipicaxune.avrasm

Silvan

Silvan
  • 21
  • 6

1 Answers1

0

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

Levi Heßmann
  • 140
  • 1
  • 6