Added player.craft handler

This commit is contained in:
Shoghi Cervantes 2013-11-24 11:45:18 +01:00
parent 5a71043ab0
commit 1c5b473b36

View File

@ -736,6 +736,9 @@ class Player{
} }
if(is_array($res)){ if(is_array($res)){
if($this->server->api->dhandle("player.craft", array("player" => $this, "recipe" => $recipe, "craft" => $craft, "type" => $type)) === false){
return false;
}
foreach($recipe as $slot => $item){ foreach($recipe as $slot => $item){
$s = $this->getSlot($slot); $s = $this->getSlot($slot);
$s->count -= $item->count; $s->count -= $item->count;