mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 11:18:52 +00:00
Packet crashes fixed :D
This commit is contained in:
parent
205f6d50c1
commit
0aa9586a52
@ -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"]));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user