exception fix
This commit is contained in:
		
				
					committed by
					
						 Steffen Schröder
						Steffen Schröder
					
				
			
			
				
	
			
			
			
						parent
						
							31659d50d0
						
					
				
				
					commit
					b6f5fc5686
				
			| @@ -9,7 +9,6 @@ use ManiaControl\Commands\CommandListener; | |||||||
| use ManiaControl\Formatter; | use ManiaControl\Formatter; | ||||||
| use ManiaControl\ManiaControl; | use ManiaControl\ManiaControl; | ||||||
| use ManiaControl\Players\Player; | use ManiaControl\Players\Player; | ||||||
| use Maniaplanet\DedicatedServer\InvalidArgumentException; |  | ||||||
|  |  | ||||||
| /** | /** | ||||||
|  * MapQueue Class |  * MapQueue Class | ||||||
| @@ -176,17 +175,12 @@ class MapQueue implements CallbackListener, CommandListener { | |||||||
| 		$this->nextMap = array_shift($this->queuedMaps); | 		$this->nextMap = array_shift($this->queuedMaps); | ||||||
|  |  | ||||||
| 		//Check if Map Queue is empty | 		//Check if Map Queue is empty | ||||||
| 		if ($this->nextMap == null) { | 		if ($this->nextMap == null || !isset($this->nextMap[1])) { | ||||||
| 			return; | 			return; | ||||||
| 		} | 		} | ||||||
| 		$map = $this->nextMap[1]; | 		$map = $this->nextMap[1]; | ||||||
|  |  | ||||||
|  | 		$this->maniaControl->client->chooseNextMap($map->fileName); | ||||||
| 		try { |  | ||||||
| 			$this->maniaControl->client->chooseNextMap($map->fileName); |  | ||||||
| 		} catch(InvalidArgumentException $e) { |  | ||||||
| 			//do nothing |  | ||||||
| 		} |  | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	/** | 	/** | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user