From 5d53c259cfe7b3ad724b1746a9a0ffd0c6f2ff31 Mon Sep 17 00:00:00 2001 From: Lloyd Weehuizen Date: Sun, 24 Nov 2013 15:50:27 +1300 Subject: [PATCH 1/3] Fix argument parsing --- src/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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( From 1c5b473b3626755f60e84cb02da09b2ab5c93eb7 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sun, 24 Nov 2013 11:45:18 +0100 Subject: [PATCH 2/3] Added player.craft handler --- src/Player.php | 3 +++ 1 file changed, 3 insertions(+) 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; From 8e452831e10483dd61deb6706fda52c7dd302734 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sun, 24 Nov 2013 12:03:37 +0100 Subject: [PATCH 3/3] Fixed undefined $orderingChannel --- src/network/Packet.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }