diff --git a/src/Player.php b/src/Player.php index d5a6a6c65..5df609215 100644 --- a/src/Player.php +++ b/src/Player.php @@ -736,6 +736,9 @@ class Player{ } 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){ $s = $this->getSlot($slot); $s->count -= $item->count; diff --git a/src/functions.php b/src/functions.php index 701d01c95..d61141eb5 100644 --- a/src/functions.php +++ b/src/functions.php @@ -142,7 +142,7 @@ function arguments ( $args ){ array_shift( $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 ); $ret = array( diff --git a/src/network/Packet.php b/src/network/Packet.php index 0993ddd04..6e09ad4a1 100644 --- a/src/network/Packet.php +++ b/src/network/Packet.php @@ -272,7 +272,7 @@ class Packet{ } if($length == 0 - or $orderingChannel >= 32 + or $orderChannel >= 32 or ($hasSplit === 1 and $splitIndex >= $splitCount)){ continue; }