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
218fd999b0
commit
fc128affc5
@ -113,7 +113,6 @@ use pocketmine\tile\Sign;
|
|||||||
use pocketmine\tile\Spawnable;
|
use pocketmine\tile\Spawnable;
|
||||||
use pocketmine\tile\Tile;
|
use pocketmine\tile\Tile;
|
||||||
use pocketmine\utils\TextFormat;
|
use pocketmine\utils\TextFormat;
|
||||||
use pocketmine\utils\TextWrapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main class that handles networking, recovery, and packet sending to the server part
|
* 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){
|
public function sendMessage($message){
|
||||||
if($this->removeFormat !== false){
|
if($this->removeFormat !== false){
|
||||||
$message = TextWrapper::wrap(TextFormat::clean($message));
|
$message = TextFormat::clean($message);
|
||||||
}
|
}
|
||||||
$mes = explode("\n", $message);
|
$mes = explode("\n", $message);
|
||||||
foreach($mes as $m){
|
foreach($mes as $m){
|
||||||
|
@ -1610,6 +1610,7 @@ class Server{
|
|||||||
InventoryType::init();
|
InventoryType::init();
|
||||||
Block::init();
|
Block::init();
|
||||||
Item::init();
|
Item::init();
|
||||||
|
/** TODO: @deprecated */
|
||||||
TextWrapper::init();
|
TextWrapper::init();
|
||||||
$this->craftingManager = new CraftingManager();
|
$this->craftingManager = new CraftingManager();
|
||||||
|
|
||||||
|
@ -21,6 +21,10 @@
|
|||||||
|
|
||||||
namespace pocketmine\utils;
|
namespace pocketmine\utils;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
abstract class TextWrapper{
|
abstract class TextWrapper{
|
||||||
|
|
||||||
private static $characterWidths = [
|
private static $characterWidths = [
|
||||||
@ -47,6 +51,13 @@ abstract class TextWrapper{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @param $text
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public static function wrap($text){
|
public static function wrap($text){
|
||||||
$result = "";
|
$result = "";
|
||||||
$len = strlen($text);
|
$len = strlen($text);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user