mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
Added player.craft handler
This commit is contained in:
parent
5a71043ab0
commit
1c5b473b36
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue