From 547aa2ae31a5ba5a38c63e1feaae85338a258c2a Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Mon, 13 Apr 2015 16:45:20 +0200 Subject: [PATCH] Removed formatting on signs, allow OPs to use colored chat (or people with disabled remove format) --- src/pocketmine/Player.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index 92d3fbd9d..c2236a5fe 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -1544,6 +1544,9 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ round($this->z, 4) ])); + if($this->isOp()){ + $this->setRemoveFormat(false); + } $this->orderChunks(); $this->sendNextChunk(); @@ -2383,7 +2386,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{ $t->spawnTo($this); }else{ $ev = new SignChangeEvent($t->getBlock(), $this, [ - $nbt["Text1"], $nbt["Text2"], $nbt["Text3"], $nbt["Text4"] + TextFormat::clean($nbt["Text1"], $this->removeFormat), TextFormat::clean($nbt["Text2"], $this->removeFormat), TextFormat::clean($nbt["Text3"], $this->removeFormat), TextFormat::clean($nbt["Text4"], $this->removeFormat) ]); if(!isset($t->namedtag->Creator) or $t->namedtag["Creator"] !== $this->username){