I was trying to fix signs in sw svile plugin,and I think I fixed them, also, I fixed the "must be utf-8 etc." problem that I had,but when I tried TextFormat::colorize ,the colors from the sw sign disappeared like when I used TextFormat::clean . PHP: /** * "@"param bool $all * "@"param string $SWname * "@"param int $players * "@"param int $slot * "@"param string $state */ public function refreshSigns($all = true, $SWname = "", $players = 0, $slot = 0, $state = "&fTap to join") { if (!$all) { $ex = explode(':', array_search($SWname, $this->signs)); if (count($ex) == 0b100) { $this->getServer()->loadLevel($ex[0b11]); if ($this->getServer()->getLevelByName($ex[0b11]) != null) { $tile = $this->getServer()->getLevelByName($ex[0b11])->getTile(new Vector3($ex[0], (int)$ex[1], $ex[2])); if ($tile != null && $tile instanceof Sign) { $text = $tile->getText(); $tile->setText(TextFormat::colorize($text[0], $text[1], "&a" . $players . "&7/&a" . $slot, $state)); } else { $this->getLogger()->critical('Can\'t get ' . $SWname . ' sign.Error finding sign on level: ' . $ex[0b11] . ' x:' . $ex[0] . ' y:' . $ex[1] . ' z:' . $ex[2]); } } } } else { foreach ($this->signs as $key => $val) { $ex = explode(':', $key); $this->getServer()->loadLevel($ex[0b11]); if ($this->getServer()->getLevelByName($ex[0b11]) instanceof \pocketmine\level\Level) { $tile = $this->getServer()->getLevelByName($ex[0b11])->getTile(new Vector3($ex[0], (int)$ex[1], $ex[2])); if ($tile instanceof Sign) { $text = $tile->getText(); $tile->setText($text[0], $text[1], $this->arenas[$val]->getSlot(true) . "/" . $this->arenas[$val]->getSlot(), $text[3]); } else { $this->getLogger()->critical('Can\'t get ' . $val . ' sign.Error finding sign on level: ' . $ex[0b11] . ' x:' . $ex[0] . ' y:' . $ex[1] . ' z:' . $ex[2]); } } } } } I just wanted to report that problem,and if you can fix that problem in pmmp so colors will be shown,I would be ok.
Please provide the actual data you passed to colorize(). Try showing us the json_encode() of the data.
The signs data file is not in json. Its that .db file. But the problem is that colors and words are disappearing when I do one of the two TextFormat codes.
The problem lies here PHP: $tile->setText(TextFormat::colorize($text[0], $text[1], "&a" . $players . "&7/&a" . $slot, $state)); It should be PHP: $tile->setText(TextFormat::colorize($text[0]),TextFormat::colorize($text[1]), TextFormat::colorize("&a" . $players . "&7/&a" . $slot),TextFormat::colorize($state));
Ok thanks,I did TextFormat::colorize with that example and changed some things also in the plugin and now signs are fixed.
There should a button called "Thread tools" in the top right corner, that should allow you to add the solved tag.
Yes it exists,but It doesn't have an option to add the Solved tag,I remember that before months it was exist. But ok I don't have problem with that.