From 16eb45925acf82cdfb292f02dc1ee7fe3f26b7a3 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Fri, 28 Feb 2014 00:12:57 +0100 Subject: [PATCH 1/2] Remove non-implemented chat colors from player messages --- src/Player.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Player.php b/src/Player.php index 67ce4d822..130ca0a63 100644 --- a/src/Player.php +++ b/src/Player.php @@ -2025,6 +2025,7 @@ class Player{ } $this->craftingItems = array(); $this->toCraft = array(); + $packet->message = TextFormat::clean($packet->message); if(trim($packet->message) != "" and strlen($packet->message) <= 255){ $message = $packet->message; if($message{0} === "/"){ //Command From 5bf440d820cd8d0de12c5bd8ddf8f4f5ae7342e9 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Sat, 1 Mar 2014 21:45:07 +0100 Subject: [PATCH 2/2] Fixed level upgrade and direct save on load --- src/pmf/PMFLevel.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pmf/PMFLevel.php b/src/pmf/PMFLevel.php index acb8776cf..540e298c5 100644 --- a/src/pmf/PMFLevel.php +++ b/src/pmf/PMFLevel.php @@ -243,9 +243,8 @@ class PMFLevel extends PMF{ ); $this->chunks[$index] = array(); $this->chunkChange[$index] = array(-1 => false); - for($Y = 0; $Y < $this->chunkInfo[$index][0]; ++$Y){ - $t = 1 << $Y; - if(($this->chunkInfo[$index][0] & $t) === $t){ + for($Y = 0; $Y < 8; ++$Y){ + if(($this->chunkInfo[$index][0] & (1 << $Y)) !== 0){ // 4096 + 2048 + 2048, Block Data, Meta, Light if(strlen($this->chunks[$index][$Y] = gzread($chunk, 8192)) < 8192){ console("[NOTICE] Empty corrupt chunk detected [$X,$Z,:$Y], recovering contents", true, true, 2);