mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-19 04:05:31 +00:00
Added player.craft handler
This commit is contained in:
parent
5a71043ab0
commit
1c5b473b36
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user