Packet crashes fixed :D

This commit is contained in:
Shoghi Cervantes 2015-04-09 20:44:04 +02:00
parent 205f6d50c1
commit 0aa9586a52
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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"]));
}