mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 17:29:44 +00:00
Removed chat wrapping, deprecated TextWrapper
This commit is contained in:
parent
d80b8524fb
commit
696ba08a81
@ -113,7 +113,6 @@ use pocketmine\tile\Sign;
|
||||
use pocketmine\tile\Spawnable;
|
||||
use pocketmine\tile\Tile;
|
||||
use pocketmine\utils\TextFormat;
|
||||
use pocketmine\utils\TextWrapper;
|
||||
|
||||
/**
|
||||
* Main class that handles networking, recovery, and packet sending to the server part
|
||||
@ -2415,7 +2414,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
*/
|
||||
public function sendMessage($message){
|
||||
if($this->removeFormat !== false){
|
||||
$message = TextWrapper::wrap(TextFormat::clean($message));
|
||||
$message = TextFormat::clean($message);
|
||||
}
|
||||
$mes = explode("\n", $message);
|
||||
foreach($mes as $m){
|
||||
|
@ -1610,6 +1610,7 @@ class Server{
|
||||
InventoryType::init();
|
||||
Block::init();
|
||||
Item::init();
|
||||
/** TODO: @deprecated */
|
||||
TextWrapper::init();
|
||||
$this->craftingManager = new CraftingManager();
|
||||
|
||||
|
@ -21,6 +21,10 @@
|
||||
|
||||
namespace pocketmine\utils;
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
abstract class TextWrapper{
|
||||
|
||||
private static $characterWidths = [
|
||||
@ -47,6 +51,13 @@ abstract class TextWrapper{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*
|
||||
* @param $text
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function wrap($text){
|
||||
$result = "";
|
||||
$len = strlen($text);
|
||||
|
Loading…
x
Reference in New Issue
Block a user