fixed some buggies

This commit is contained in:
Cheese 2015-07-05 15:26:56 +10:00
parent bde58fcad9
commit e24890d292
1 changed files with 23 additions and 39 deletions

View File

@ -26,19 +26,13 @@ class WorldComponent implements Listener
private $world;
private $worldName;
private $mapName;
private $mapAuthor;
private $mapTeams = array();
private $mapData = array();
private $minX = -256;
private $maxX = 256;
private $minY = -256;
private $maxY = 256;
private $minZ = -256;
private $maxZ = 256;
private $mapSettings = array();
public function __construct(Arena $arena)
{
@ -97,29 +91,14 @@ class WorldComponent implements Listener
}
//Map Boundaries
else if (strcmp($tokens[0], "MIN_X") === 0)
elseif (strcmp($tokens[0], "MIN_X") === 0 ||
strcmp($tokens[0], "MAX_X") === 0 ||
strcmp($tokens[0], "MIN_Y") === 0 ||
strcmp($tokens[0], "MAX_Y") === 0 ||
strcmp($tokens[0], "MIN_Z") === 0 ||
strcmp($tokens[0], "MAX_Z") === 0)
{
$this->minX = $tokens[1];
}
else if (strcmp($tokens[0], "MAX_X") === 0)
{
$this->maxX = $tokens[1];
}
else if (strcmp($tokens[0], "MIN_Y") === 0)
{
$this->minY = $tokens[1];
}
else if (strcmp($tokens[0], "MAX_Y") === 0)
{
$this->maxY = $tokens[1];
}
else if (strcmp($tokens[0], "MIN_Z") === 0)
{
$this->minZ = $tokens[1];
}
else if (strcmp($tokens[0], "MAX_Z") === 0)
{
$this->maxZ = $tokens[1];
$this->mapSettings[$tokens[0]] = $tokens[1];
}
//Team Spawns
@ -180,9 +159,14 @@ class WorldComponent implements Listener
return $this->mapTeams;
}
public function getSetting($key)
{
return $this->mapSettings[$key];
}
public function getData($key)
{
return $this->worldData[$key];
return $this->mapData[$key];
}
protected function strToLoc($str)