I am trying to debug a plugin (Skywars plugin) and this error comes up every time I execute join. This is the part of the code when /sw join was successfully executed. PHP: if($this->playersInArena[strtoupper($args[1])] < $max) { $this->gamePlayers[$name] = strtoupper($args[1]); $conf = new Config($this->getDataFolder() . strtoupper($args[1]) . ".yml", CONFIG::YAML); $world = $this->getServer()->getLevelByName($conf->get("LobbyWorld")); $x = $conf->get("LobbyX"); $y = $conf->get("LobbyY"); $z = $conf->get("LobbyZ"); $world->loadChunk($x, $z); $world->loadChunk($world->getSpawnLocation()->getX(), $world->getSpawnLocation()->getZ()); $sender->teleport($world->getSpawnLocation(), 0, 0); $pos = new Vector3($x, $y, $z); $sender->getInventory()->clearAll(); $sender->setGamemode(2); $sender->teleport($pos); $sender->sendMessage("> Welcome to arena '" . $conf->get("FullName") . "'!\nThe game will start soon!"); ++$this->playersInArena[strtoupper($args[1])]; return true; Fatal error: Call to a member function loadChunk() on null on line 260 (Yes, I know you aren't mine readers, but this plugin is on sale by other person, so there is a limit on how much I can put up.) I don't think there is anything wrong for me at least, and I don't quite understand the error. EDIT: line 260 is PHP: $world->loadChunk($x, $z); .
$world is not the Level object or the level doesn't exist or not loaded... Try to load / generate the level before
thanks. but can anyone tell me what the error means? Fatal error: Call to a member function function() on null