better custom packet handling

This commit is contained in:
Shoghi Cervantes Pueyo
2012-11-25 20:27:33 +01:00
parent 95b78a90ac
commit 0205880f99
8 changed files with 62 additions and 24 deletions

View File

@ -28,13 +28,15 @@ the Free Software Foundation, either version 3 of the License, or
require_once("classes/Session.class.php");
class PocketMinecraftServer{
protected $interface, $protocol, $entities, $player, $cnt, $events, $username, $version, $clients, $serverType;
var $seed, $protocol;
protected $interface, $entities, $player, $cnt, $events, $username, $version, $clients, $serverType;
function __construct($username, $protocol = CURRENT_PROTOCOL, $version = CURRENT_VERSION){
//$this->player = new Player($username);
$this->version = (int) $version;
$this->username = $username;
$this->cnt = 1;
$this->serverID = substr(Utils::generateKey(), 0, 8);
$this->seed = "\x4f\xf0\x2d\x84\x00\x00\x00\x00";
$this->events = array("disabled" => array());
$this->actions = array();
$this->clients = array();