This commit is contained in:
Aaron Brock 2015-07-07 00:38:00 -04:00
parent af8d1bdc83
commit b65d75ab0d

View File

@ -50,11 +50,11 @@ class SimpleSpawnComponent implements SpawnComponent, Listener {
{ {
if (!($value instanceof Position)) if (!($value instanceof Position))
unset($this->spawns[$key]); unset($this->spawns[$key]);
$this->spawns[$key] = new Position($value->getX(), $value->getY(), $value->getZ(), $event->getLevel());
} }
print (count($this->spawns) . " spawns Loaded"); print (count($this->spawns) . " spawns Loaded\n");
//Just testing to make sure it is a location.
$pos = $this->spawns[array_rand($this->spawns)]; $pos = $this->spawns[array_rand($this->spawns)];
print "\nX: " . $pos->getX(); print "\nX: " . $pos->getX();