Code: $level = $this->main->getServer()->getLevelByName("bedwars"); $level->dropItem(new Vector3(96,66,258), Item::get(265,0,4)); $level->dropItem(new Vector3(250,66,254), Item::get(265,0,4)); error: "Call to a member function dropItem() on null" (EXCEPTION) in "plugins/bedwars.phar/src/euto3rr/Task/BaseIngotGenerator" at line 28
PHP: $levelName = "bedwars";$server = $this->main->getServer();if($server->isLevelGenerated($levelName)){if(!$server->isLevelLoaded($levelName)){ $server->loadLevel($levelName);}$level = $server->getLevelByName($levelName);$level->dropItem(new Vector3(96,66,258), Item::get(265,0,4)); $level->dropItem(new Vector3(250,66,254), Item::get(265,0,4));}