mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-29 14:49:59 +00:00
Remove some unused properties from Player
This commit is contained in:
parent
8beefabbbc
commit
f881cea8e0
@ -171,27 +171,20 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
|
|
||||||
protected $messageCounter = 2;
|
protected $messageCounter = 2;
|
||||||
|
|
||||||
protected $sendIndex = 0;
|
|
||||||
|
|
||||||
private $clientSecret;
|
private $clientSecret;
|
||||||
|
|
||||||
/** @var Vector3 */
|
/** @var Vector3 */
|
||||||
public $speed = null;
|
public $speed = null;
|
||||||
|
|
||||||
public $blocked = false;
|
|
||||||
public $achievements = [];
|
public $achievements = [];
|
||||||
public $lastCorrect;
|
|
||||||
/** @var SimpleTransactionGroup */
|
/** @var SimpleTransactionGroup */
|
||||||
protected $currentTransaction = null;
|
protected $currentTransaction = null;
|
||||||
public $craftingType = 0; //0 = 2x2 crafting, 1 = 3x3 crafting, 2 = stonecutter
|
public $craftingType = 0; //0 = 2x2 crafting, 1 = 3x3 crafting, 2 = stonecutter
|
||||||
|
|
||||||
protected $isCrafting = false;
|
|
||||||
|
|
||||||
public $creationTime = 0;
|
public $creationTime = 0;
|
||||||
|
|
||||||
protected $randomClientId;
|
protected $randomClientId;
|
||||||
|
|
||||||
protected $lastMovement = 0;
|
|
||||||
/** @var Vector3 */
|
/** @var Vector3 */
|
||||||
protected $forceMovement = null;
|
protected $forceMovement = null;
|
||||||
/** @var Vector3 */
|
/** @var Vector3 */
|
||||||
@ -2036,7 +2029,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
$this->setDataFlag(self::DATA_FLAGS, self::DATA_FLAG_ACTION, false);
|
$this->setDataFlag(self::DATA_FLAGS, self::DATA_FLAG_ACTION, false);
|
||||||
break;
|
break;
|
||||||
case ProtocolInfo::USE_ITEM_PACKET:
|
case ProtocolInfo::USE_ITEM_PACKET:
|
||||||
if($this->spawned === false or !$this->isAlive() or $this->blocked){
|
if($this->spawned === false or !$this->isAlive()){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2146,7 +2139,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ProtocolInfo::PLAYER_ACTION_PACKET:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2303,8 +2296,6 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
$this->inventory->sendContents($this);
|
$this->inventory->sendContents($this);
|
||||||
$this->inventory->sendArmorContents($this);
|
$this->inventory->sendArmorContents($this);
|
||||||
|
|
||||||
$this->blocked = false;
|
|
||||||
|
|
||||||
$this->spawnToAll();
|
$this->spawnToAll();
|
||||||
$this->scheduleUpdate();
|
$this->scheduleUpdate();
|
||||||
break;
|
break;
|
||||||
@ -2355,7 +2346,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ProtocolInfo::REMOVE_BLOCK_PACKET:
|
case ProtocolInfo::REMOVE_BLOCK_PACKET:
|
||||||
if($this->spawned === false or $this->blocked === true or !$this->isAlive()){
|
if($this->spawned === false or !$this->isAlive()){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->craftingType = 0;
|
$this->craftingType = 0;
|
||||||
@ -2399,7 +2390,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ProtocolInfo::INTERACT_PACKET:
|
case ProtocolInfo::INTERACT_PACKET:
|
||||||
if($this->spawned === false or !$this->isAlive() or $this->blocked){
|
if($this->spawned === false or !$this->isAlive()){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2543,7 +2534,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
case ProtocolInfo::SET_HEALTH_PACKET: //Not used
|
case ProtocolInfo::SET_HEALTH_PACKET: //Not used
|
||||||
break;
|
break;
|
||||||
case ProtocolInfo::ENTITY_EVENT_PACKET:
|
case ProtocolInfo::ENTITY_EVENT_PACKET:
|
||||||
if($this->spawned === false or $this->blocked === true or !$this->isAlive()){
|
if($this->spawned === false or !$this->isAlive()){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->craftingType = 0;
|
$this->craftingType = 0;
|
||||||
@ -2570,7 +2561,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ProtocolInfo::DROP_ITEM_PACKET:
|
case ProtocolInfo::DROP_ITEM_PACKET:
|
||||||
if($this->spawned === false or $this->blocked === true or !$this->isAlive()){
|
if($this->spawned === false or !$this->isAlive()){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2835,7 +2826,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ProtocolInfo::CONTAINER_SET_SLOT_PACKET:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2913,7 +2904,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case ProtocolInfo::BLOCK_ENTITY_DATA_PACKET:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
$this->craftingType = 0;
|
$this->craftingType = 0;
|
||||||
@ -2951,7 +2942,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ProtocolInfo::ITEM_FRAME_DROP_ITEM_PACKET:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user