Player event

This commit is contained in:
Shoghi Cervantes 2014-03-23 15:14:11 +01:00
parent ee265d44bd
commit 1429a74beb

View File

@ -636,10 +636,9 @@ class Player extends RealHuman{
return false;
}
}
if($this->server->api->dhandle("achievement.grant", array("player" => $this, "achievementId" => $achievementId)) !== false){
if(EventHandler::callEvent(new Event\Player\PlayerAchievementAwardedEvent($this, $achievementId)) !== Event\Event::DENY){
$this->achievements[$achievementId] = true;
Achievement::broadcast($this, $achievementId);
return true;
}else{
return false;