public function updateFaction()
{
$this->plugin->getServer()->getLogger()->info("Updating Faction...");
foreach($this->plugin->getFactions() as $faction)
{
$this->plugin->getServer()->getLogger()->info("test");
if($faction->hasPlayer($this->player))
{
$this->faction = $faction->getName();
return true;
}
$this->faction = null;
}
}
When I run this code (using the Pocketmine API) in the console it prints out "Updating Faction..." but never reaches the next line and doesn't print out "test". I feel like there is some stupid error I'm just not seeing here, but it's got me stumped.