Remove some unused properties from Player

This commit is contained in:
Dylan K. Taylor 2017-01-28 17:53:52 +00:00
parent 8beefabbbc
commit f881cea8e0

View File

@ -171,27 +171,20 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
protected $messageCounter = 2;
protected $sendIndex = 0;
private $clientSecret;
/** @var Vector3 */
public $speed = null;
public $blocked = false;
public $achievements = [];
public $lastCorrect;
/** @var SimpleTransactionGroup */
protected $currentTransaction = null;
public $craftingType = 0; //0 = 2x2 crafting, 1 = 3x3 crafting, 2 = stonecutter
protected $isCrafting = false;
public $creationTime = 0;
protected $randomClientId;
protected $lastMovement = 0;
/** @var Vector3 */
protected $forceMovement = null;
/** @var Vector3 */
@ -2036,7 +2029,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$this->setDataFlag(self::DATA_FLAGS, self::DATA_FLAG_ACTION, false);
break;
case ProtocolInfo::USE_ITEM_PACKET:
if($this->spawned === false or !$this->isAlive() or $this->blocked){
if($this->spawned === false or !$this->isAlive()){
break;
}
@ -2146,7 +2139,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
}
break;
case ProtocolInfo::PLAYER_ACTION_PACKET:
if($this->spawned === false or $this->blocked === true or (!$this->isAlive() and $packet->action !== PlayerActionPacket::ACTION_RESPAWN and $packet->action !== PlayerActionPacket::ACTION_DIMENSION_CHANGE)){
if($this->spawned === false or (!$this->isAlive() and $packet->action !== PlayerActionPacket::ACTION_RESPAWN and $packet->action !== PlayerActionPacket::ACTION_DIMENSION_CHANGE)){
break;
}
@ -2303,8 +2296,6 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
$this->inventory->sendContents($this);
$this->inventory->sendArmorContents($this);
$this->blocked = false;
$this->spawnToAll();
$this->scheduleUpdate();
break;
@ -2355,7 +2346,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
break;
case ProtocolInfo::REMOVE_BLOCK_PACKET:
if($this->spawned === false or $this->blocked === true or !$this->isAlive()){
if($this->spawned === false or !$this->isAlive()){
break;
}
$this->craftingType = 0;
@ -2399,7 +2390,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
break;
case ProtocolInfo::INTERACT_PACKET:
if($this->spawned === false or !$this->isAlive() or $this->blocked){
if($this->spawned === false or !$this->isAlive()){
break;
}
@ -2543,7 +2534,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
case ProtocolInfo::SET_HEALTH_PACKET: //Not used
break;
case ProtocolInfo::ENTITY_EVENT_PACKET:
if($this->spawned === false or $this->blocked === true or !$this->isAlive()){
if($this->spawned === false or !$this->isAlive()){
break;
}
$this->craftingType = 0;
@ -2570,7 +2561,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
}
break;
case ProtocolInfo::DROP_ITEM_PACKET:
if($this->spawned === false or $this->blocked === true or !$this->isAlive()){
if($this->spawned === false or !$this->isAlive()){
break;
}
@ -2835,7 +2826,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
break;
case ProtocolInfo::CONTAINER_SET_SLOT_PACKET:
if($this->spawned === false or $this->blocked === true or !$this->isAlive()){
if($this->spawned === false or !$this->isAlive()){
break;
}
@ -2913,7 +2904,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
break;
case ProtocolInfo::BLOCK_ENTITY_DATA_PACKET:
if($this->spawned === false or $this->blocked === true or !$this->isAlive()){
if($this->spawned === false or !$this->isAlive()){
break;
}
$this->craftingType = 0;
@ -2951,7 +2942,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
}
break;
case ProtocolInfo::ITEM_FRAME_DROP_ITEM_PACKET:
if($this->spawned === false or $this->blocked === true or !$this->isAlive()){
if($this->spawned === false or !$this->isAlive()){
break;
}