Merge pull request #3 from PocketMine/master

Update
This commit is contained in:
Leon Chang 2013-11-24 03:11:57 -08:00
commit f377eacc0f
3 changed files with 5 additions and 2 deletions

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;

View File

@ -142,7 +142,7 @@ function arguments ( $args ){
array_shift( $args ); array_shift( $args );
$args = join( $args, ' ' ); $args = join( $args, ' ' );
preg_match_all('/ (--[\w\-]+ (?:[= ] [^-]+ [^\s-] )? ) | (-\w+) | (\w+) /x', $args, $match ); preg_match_all('/ (--[\w\-]+ (?:[= ] [^-\s]+ )? ) | (-\w+) | (\w+) /x', $args, $match );
$args = array_shift( $match ); $args = array_shift( $match );
$ret = array( $ret = array(

View File

@ -272,7 +272,7 @@ class Packet{
} }
if($length == 0 if($length == 0
or $orderingChannel >= 32 or $orderChannel >= 32
or ($hasSplit === 1 and $splitIndex >= $splitCount)){ or ($hasSplit === 1 and $splitIndex >= $splitCount)){
continue; continue;
} }