mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 04:06:54 +00:00
Packet crashes fixed :D
This commit is contained in:
@@ -23,9 +23,11 @@ namespace pocketmine\network\protocol;
|
||||
|
||||
#include <rules/DataPacket.h>
|
||||
|
||||
|
||||
#ifndef COMPILE
|
||||
use pocketmine\utils\Binary;
|
||||
|
||||
#endif
|
||||
|
||||
class AddEntityPacket extends DataPacket{
|
||||
public static $pool = [];
|
||||
public static $next = 0;
|
||||
|
@@ -53,7 +53,7 @@ abstract class Terminal{
|
||||
if(self::$formattingCodes === null){
|
||||
$opts = getopt("", ["enable-ansi", "disable-ansi"]);
|
||||
if(isset($opts["disable-ansi"])){
|
||||
self::$hasFormattingCodes = false;
|
||||
self::$formattingCodes = false;
|
||||
}
|
||||
self::$formattingCodes = ((Utils::getOS() !== "win" and getenv("TERM") !== "") or isset($opts["enable-ansi"]));
|
||||
}
|
||||
|
Reference in New Issue
Block a user