mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 15:41:33 +00:00
Mass removal of useless @param/@return PHPDoc annotations, pass 1
This commit is contained in:
@@ -35,7 +35,6 @@ interface AdvancedSourceInterface extends SourceInterface{
|
||||
/**
|
||||
* Prevents packets received from the IP address getting processed for the given timeout.
|
||||
*
|
||||
* @param string $address
|
||||
* @param int $timeout Seconds
|
||||
*
|
||||
* @return void
|
||||
@@ -45,15 +44,11 @@ interface AdvancedSourceInterface extends SourceInterface{
|
||||
/**
|
||||
* Unblocks a previously-blocked address.
|
||||
*
|
||||
* @param string $address
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function unblockAddress(string $address);
|
||||
|
||||
/**
|
||||
* @param Network $network
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setNetwork(Network $network);
|
||||
@@ -61,10 +56,6 @@ interface AdvancedSourceInterface extends SourceInterface{
|
||||
/**
|
||||
* Sends a raw payload to the network interface, bypassing any sessions.
|
||||
*
|
||||
* @param string $address
|
||||
* @param int $port
|
||||
* @param string $payload
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function sendRawPacket(string $address, int $port, string $payload);
|
||||
|
||||
@@ -36,7 +36,6 @@ class CompressBatchedTask extends AsyncTask{
|
||||
public $data;
|
||||
|
||||
/**
|
||||
* @param BatchPacket $batch
|
||||
* @param Player[] $targets
|
||||
*/
|
||||
public function __construct(BatchPacket $batch, array $targets){
|
||||
|
||||
@@ -112,17 +112,12 @@ class Network{
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param SourceInterface $interface
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function processInterface(SourceInterface $interface) : void{
|
||||
$interface->process();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param SourceInterface $interface
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function registerInterface(SourceInterface $interface){
|
||||
@@ -140,8 +135,6 @@ class Network{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param SourceInterface $interface
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function unregisterInterface(SourceInterface $interface){
|
||||
@@ -152,8 +145,6 @@ class Network{
|
||||
/**
|
||||
* Sets the server name shown on each interface Query
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setName(string $name){
|
||||
@@ -163,9 +154,6 @@ class Network{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName() : string{
|
||||
return $this->name;
|
||||
}
|
||||
@@ -179,18 +167,11 @@ class Network{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Server
|
||||
*/
|
||||
public function getServer() : Server{
|
||||
return $this->server;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $address
|
||||
* @param int $port
|
||||
* @param string $payload
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function sendPacket(string $address, int $port, string $payload){
|
||||
@@ -202,9 +183,6 @@ class Network{
|
||||
/**
|
||||
* Blocks an IP address from the main interface. Setting timeout to -1 will block it forever
|
||||
*
|
||||
* @param string $address
|
||||
* @param int $timeout
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function blockAddress(string $address, int $timeout = 300){
|
||||
@@ -214,8 +192,6 @@ class Network{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $address
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function unblockAddress(string $address){
|
||||
|
||||
@@ -44,11 +44,6 @@ interface SourceInterface{
|
||||
/**
|
||||
* Sends a DataPacket to the interface, returns an unique identifier for the packet if $needACK is true
|
||||
*
|
||||
* @param Player $player
|
||||
* @param DataPacket $packet
|
||||
* @param bool $needACK
|
||||
* @param bool $immediate
|
||||
*
|
||||
* @return int|null
|
||||
*/
|
||||
public function putPacket(Player $player, DataPacket $packet, bool $needACK = false, bool $immediate = true);
|
||||
@@ -56,16 +51,11 @@ interface SourceInterface{
|
||||
/**
|
||||
* Terminates the connection
|
||||
*
|
||||
* @param Player $player
|
||||
* @param string $reason
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function close(Player $player, string $reason = "unknown reason");
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setName(string $name);
|
||||
|
||||
@@ -104,8 +104,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param SkinData $skin
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function putSkin(SkinData $skin){
|
||||
@@ -275,8 +273,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
* Decodes entity metadata from the stream.
|
||||
*
|
||||
* @param bool $types Whether to include metadata types along with values in the returned array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getEntityMetadata(bool $types = true) : array{
|
||||
$count = $this->getUnsignedVarInt();
|
||||
@@ -329,8 +325,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
|
||||
/**
|
||||
* Writes entity metadata to the packet buffer.
|
||||
*
|
||||
* @param array $metadata
|
||||
*/
|
||||
public function putEntityMetadata(array $metadata) : void{
|
||||
$this->putUnsignedVarInt(count($metadata));
|
||||
@@ -427,7 +421,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
|
||||
/**
|
||||
* Reads and returns an EntityUniqueID
|
||||
* @return int
|
||||
*/
|
||||
public function getEntityUniqueId() : int{
|
||||
return $this->getVarLong();
|
||||
@@ -435,8 +428,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
|
||||
/**
|
||||
* Writes an EntityUniqueID
|
||||
*
|
||||
* @param int $eid
|
||||
*/
|
||||
public function putEntityUniqueId(int $eid) : void{
|
||||
$this->putVarLong($eid);
|
||||
@@ -444,7 +435,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
|
||||
/**
|
||||
* Reads and returns an EntityRuntimeID
|
||||
* @return int
|
||||
*/
|
||||
public function getEntityRuntimeId() : int{
|
||||
return $this->getUnsignedVarLong();
|
||||
@@ -452,8 +442,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
|
||||
/**
|
||||
* Writes an EntityRuntimeID
|
||||
*
|
||||
* @param int $eid
|
||||
*/
|
||||
public function putEntityRuntimeId(int $eid) : void{
|
||||
$this->putUnsignedVarLong($eid);
|
||||
@@ -474,10 +462,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
|
||||
/**
|
||||
* Writes a block position with unsigned Y coordinate.
|
||||
*
|
||||
* @param int $x
|
||||
* @param int $y
|
||||
* @param int $z
|
||||
*/
|
||||
public function putBlockPosition(int $x, int $y, int $z) : void{
|
||||
$this->putVarInt($x);
|
||||
@@ -500,10 +484,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
|
||||
/**
|
||||
* Writes a block position with a signed Y coordinate.
|
||||
*
|
||||
* @param int $x
|
||||
* @param int $y
|
||||
* @param int $z
|
||||
*/
|
||||
public function putSignedBlockPosition(int $x, int $y, int $z) : void{
|
||||
$this->putVarInt($x);
|
||||
@@ -513,8 +493,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
|
||||
/**
|
||||
* Reads a floating-point Vector3 object with coordinates rounded to 4 decimal places.
|
||||
*
|
||||
* @return Vector3
|
||||
*/
|
||||
public function getVector3() : Vector3{
|
||||
return new Vector3(
|
||||
@@ -531,8 +509,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
* For all other purposes, use the non-nullable version.
|
||||
*
|
||||
* @see NetworkBinaryStream::putVector3()
|
||||
*
|
||||
* @param Vector3|null $vector
|
||||
*/
|
||||
public function putVector3Nullable(?Vector3 $vector) : void{
|
||||
if($vector){
|
||||
@@ -546,8 +522,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
|
||||
/**
|
||||
* Writes a floating-point Vector3 object
|
||||
*
|
||||
* @param Vector3 $vector
|
||||
*/
|
||||
public function putVector3(Vector3 $vector) : void{
|
||||
$this->putLFloat($vector->x);
|
||||
@@ -597,8 +571,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
/**
|
||||
* Writes a gamerule array, members should be in the structure [name => [type, value]]
|
||||
* TODO: implement this properly
|
||||
*
|
||||
* @param array $rules
|
||||
*/
|
||||
public function putGameRules(array $rules) : void{
|
||||
$this->putUnsignedVarInt(count($rules));
|
||||
@@ -619,9 +591,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return EntityLink
|
||||
*/
|
||||
protected function getEntityLink() : EntityLink{
|
||||
$link = new EntityLink();
|
||||
|
||||
@@ -633,9 +602,6 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
return $link;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param EntityLink $link
|
||||
*/
|
||||
protected function putEntityLink(EntityLink $link) : void{
|
||||
$this->putEntityUniqueId($link->fromEntityUniqueId);
|
||||
$this->putEntityUniqueId($link->toEntityUniqueId);
|
||||
|
||||
@@ -170,8 +170,6 @@ use pocketmine\network\mcpe\protocol\VideoStreamConnectPacket;
|
||||
abstract class NetworkSession{
|
||||
|
||||
/**
|
||||
* @param DataPacket $packet
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
abstract public function handleDataPacket(DataPacket $packet);
|
||||
|
||||
@@ -268,9 +268,6 @@ class PlayerNetworkSessionAdapter extends NetworkSession{
|
||||
/**
|
||||
* Hack to work around a stupid bug in Minecraft W10 which causes empty strings to be sent unquoted in form responses.
|
||||
*
|
||||
* @param string $json
|
||||
* @param bool $assoc
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
private static function stupid_json_decode(string $json, bool $assoc = false){
|
||||
|
||||
@@ -92,10 +92,6 @@ class VerifyLoginTask extends AsyncTask{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $jwt
|
||||
* @param null|string $currentPublicKey
|
||||
* @param bool $first
|
||||
*
|
||||
* @throws VerifyLoginException if errors are encountered
|
||||
*/
|
||||
private function validateToken(string $jwt, ?string &$currentPublicKey, bool $first = false) : void{
|
||||
|
||||
@@ -39,9 +39,6 @@ class AddEntityPacket extends DataPacket/* implements ClientboundPacket*/{
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getUvarint1() : int{
|
||||
return $this->uvarint1;
|
||||
}
|
||||
|
||||
@@ -103,9 +103,6 @@ class AdventureSettingsPacket extends DataPacket{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $flag
|
||||
* @param bool $value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setFlag(int $flag, bool $value){
|
||||
|
||||
@@ -149,7 +149,6 @@ class AvailableCommandsPacket extends DataPacket{
|
||||
/**
|
||||
* @param string[] $enumValueList
|
||||
*
|
||||
* @return CommandEnum
|
||||
* @throws \UnexpectedValueException
|
||||
* @throws BinaryDataException
|
||||
*/
|
||||
@@ -184,7 +183,6 @@ class AvailableCommandsPacket extends DataPacket{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param CommandEnum $enum
|
||||
* @param int[] $enumValueMap string enum name -> int index
|
||||
*/
|
||||
protected function putEnum(CommandEnum $enum, array $enumValueMap) : void{
|
||||
@@ -211,9 +209,6 @@ class AvailableCommandsPacket extends DataPacket{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $valueCount
|
||||
*
|
||||
* @return int
|
||||
* @throws BinaryDataException
|
||||
*/
|
||||
protected function getEnumValueIndex(int $valueCount) : int{
|
||||
@@ -239,8 +234,6 @@ class AvailableCommandsPacket extends DataPacket{
|
||||
/**
|
||||
* @param CommandEnum[] $enums
|
||||
* @param string[] $enumValues
|
||||
*
|
||||
* @return CommandEnumConstraint
|
||||
*/
|
||||
protected function getEnumConstraint(array $enums, array $enumValues) : CommandEnumConstraint{
|
||||
//wtf, what was wrong with an offset inside the enum? :(
|
||||
@@ -267,7 +260,6 @@ class AvailableCommandsPacket extends DataPacket{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param CommandEnumConstraint $constraint
|
||||
* @param int[] $enumIndexes string enum name -> int index
|
||||
* @param int[] $enumValueIndexes string value -> int index
|
||||
*/
|
||||
@@ -284,7 +276,6 @@ class AvailableCommandsPacket extends DataPacket{
|
||||
* @param CommandEnum[] $enums
|
||||
* @param string[] $postfixes
|
||||
*
|
||||
* @return CommandData
|
||||
* @throws \UnexpectedValueException
|
||||
* @throws BinaryDataException
|
||||
*/
|
||||
@@ -329,7 +320,6 @@ class AvailableCommandsPacket extends DataPacket{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param CommandData $data
|
||||
* @param int[] $enumIndexes string enum name -> int index
|
||||
* @param int[] $postfixIndexes
|
||||
*/
|
||||
|
||||
@@ -76,8 +76,6 @@ class BatchPacket extends DataPacket{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DataPacket $packet
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addPacket(DataPacket $packet){
|
||||
@@ -110,8 +108,6 @@ class BatchPacket extends DataPacket{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $level
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setCompressionLevel(int $level){
|
||||
|
||||
@@ -39,8 +39,6 @@ class ClientCacheBlobStatusPacket extends DataPacket/* implements ServerboundPac
|
||||
/**
|
||||
* @param int[] $hitHashes
|
||||
* @param int[] $missHashes
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public static function create(array $hitHashes, array $missHashes) : self{
|
||||
//type checks
|
||||
|
||||
@@ -37,8 +37,6 @@ class ClientCacheMissResponsePacket extends DataPacket/* implements ClientboundP
|
||||
|
||||
/**
|
||||
* @param ChunkCacheBlob[] $blobs
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public static function create(array $blobs) : self{
|
||||
//type check
|
||||
|
||||
@@ -39,9 +39,6 @@ class ClientCacheStatusPacket extends DataPacket/* implements ServerboundPacket*
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isEnabled() : bool{
|
||||
return $this->enabled;
|
||||
}
|
||||
|
||||
@@ -87,8 +87,6 @@ class CommandOutputPacket extends DataPacket{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param CommandOutputMessage $message
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function putCommandMessage(CommandOutputMessage $message){
|
||||
|
||||
@@ -164,10 +164,6 @@ class CraftingDataPacket extends DataPacket{
|
||||
|
||||
/**
|
||||
* @param object $entry
|
||||
* @param NetworkBinaryStream $stream
|
||||
* @param int $pos
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
private static function writeEntry($entry, NetworkBinaryStream $stream, int $pos) : int{
|
||||
if($entry instanceof ShapelessRecipe){
|
||||
@@ -239,8 +235,6 @@ class CraftingDataPacket extends DataPacket{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ShapelessRecipe $recipe
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addShapelessRecipe(ShapelessRecipe $recipe){
|
||||
@@ -248,8 +242,6 @@ class CraftingDataPacket extends DataPacket{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ShapedRecipe $recipe
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addShapedRecipe(ShapedRecipe $recipe){
|
||||
@@ -257,8 +249,6 @@ class CraftingDataPacket extends DataPacket{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FurnaceRecipe $recipe
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function addFurnaceRecipe(FurnaceRecipe $recipe){
|
||||
|
||||
@@ -70,7 +70,6 @@ abstract class DataPacket extends NetworkBinaryStream{
|
||||
|
||||
/**
|
||||
* Returns whether the packet may legally have unread bytes left in the buffer.
|
||||
* @return bool
|
||||
*/
|
||||
public function mayHaveUnreadBytes() : bool{
|
||||
return false;
|
||||
@@ -142,8 +141,6 @@ abstract class DataPacket extends NetworkBinaryStream{
|
||||
* This method returns a bool to indicate whether the packet was handled or not. If the packet was unhandled, a debug message will be logged with a hexdump of the packet.
|
||||
* Typically this method returns the return value of the handler in the supplied NetworkSession. See other packets for examples how to implement this.
|
||||
*
|
||||
* @param NetworkSession $session
|
||||
*
|
||||
* @return bool true if the packet was handled successfully, false if not.
|
||||
*/
|
||||
abstract public function handle(NetworkSession $session) : bool;
|
||||
|
||||
@@ -49,7 +49,6 @@ class EmotePacket extends DataPacket/* implements ClientboundPacket, Serverbound
|
||||
|
||||
/**
|
||||
* TODO: we can't call this getEntityRuntimeId() because of base class collision (crap architecture, thanks Shoghi)
|
||||
* @return int
|
||||
*/
|
||||
public function getEntityRuntimeIdField() : int{
|
||||
return $this->entityRuntimeId;
|
||||
|
||||
@@ -70,30 +70,18 @@ class LevelChunkPacket extends DataPacket/* implements ClientboundPacket*/{
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getChunkX() : int{
|
||||
return $this->chunkX;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getChunkZ() : int{
|
||||
return $this->chunkZ;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getSubChunkCount() : int{
|
||||
return $this->subChunkCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isCacheEnabled() : bool{
|
||||
return $this->cacheEnabled;
|
||||
}
|
||||
@@ -105,9 +93,6 @@ class LevelChunkPacket extends DataPacket/* implements ClientboundPacket*/{
|
||||
return $this->usedBlobHashes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getExtraPayload() : string{
|
||||
return $this->extraPayload;
|
||||
}
|
||||
|
||||
@@ -44,16 +44,10 @@ class LevelEventGenericPacket extends DataPacket/* implements ClientboundPacket*
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getEventId() : int{
|
||||
return $this->eventId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getEventData() : string{
|
||||
return $this->eventData;
|
||||
}
|
||||
|
||||
@@ -181,27 +181,17 @@ class PacketPool{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param DataPacket $packet
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function registerPacket(DataPacket $packet){
|
||||
static::$pool[$packet->pid()] = clone $packet;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $pid
|
||||
*
|
||||
* @return DataPacket
|
||||
*/
|
||||
public static function getPacketById(int $pid) : DataPacket{
|
||||
return isset(static::$pool[$pid]) ? clone static::$pool[$pid] : new UnknownPacket();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $buffer
|
||||
*
|
||||
* @return DataPacket
|
||||
* @throws BinaryDataException
|
||||
*/
|
||||
public static function getPacket(string $buffer) : DataPacket{
|
||||
|
||||
@@ -56,18 +56,9 @@ class PlayerAuthInputPacket extends DataPacket/* implements ServerboundPacket*/{
|
||||
private $vrGazeDirection = null;
|
||||
|
||||
/**
|
||||
* @param Vector3 $position
|
||||
* @param float $pitch
|
||||
* @param float $yaw
|
||||
* @param float $headYaw
|
||||
* @param float $moveVecX
|
||||
* @param float $moveVecZ
|
||||
* @param int $inputFlags
|
||||
* @param int $inputMode @see InputMode
|
||||
* @param int $playMode @see PlayMode
|
||||
* @param Vector3|null $vrGazeDirection only used when PlayMode::VR
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public static function create(Vector3 $position, float $pitch, float $yaw, float $headYaw, float $moveVecX, float $moveVecZ, int $inputFlags, int $inputMode, int $playMode, ?Vector3 $vrGazeDirection = null) : self{
|
||||
if($playMode === PlayMode::VR and $vrGazeDirection === null){
|
||||
@@ -120,7 +111,6 @@ class PlayerAuthInputPacket extends DataPacket/* implements ServerboundPacket*/{
|
||||
|
||||
/**
|
||||
* @see InputMode
|
||||
* @return int
|
||||
*/
|
||||
public function getInputMode() : int{
|
||||
return $this->inputMode;
|
||||
@@ -128,7 +118,6 @@ class PlayerAuthInputPacket extends DataPacket/* implements ServerboundPacket*/{
|
||||
|
||||
/**
|
||||
* @see PlayMode
|
||||
* @return int
|
||||
*/
|
||||
public function getPlayMode() : int{
|
||||
return $this->playMode;
|
||||
|
||||
@@ -39,9 +39,6 @@ class RemoveEntityPacket extends DataPacket/* implements ClientboundPacket*/{
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getUvarint1() : int{
|
||||
return $this->uvarint1;
|
||||
}
|
||||
|
||||
@@ -31,25 +31,16 @@ class ChunkCacheBlob{
|
||||
|
||||
/**
|
||||
* ChunkCacheBlob constructor.
|
||||
*
|
||||
* @param int $hash
|
||||
* @param string $payload
|
||||
*/
|
||||
public function __construct(int $hash, string $payload){
|
||||
$this->hash = $hash;
|
||||
$this->payload = $payload;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getHash() : int{
|
||||
return $this->hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getPayload() : string{
|
||||
return $this->payload;
|
||||
}
|
||||
|
||||
@@ -32,8 +32,6 @@ class CommandEnumConstraint{
|
||||
private $constraints; //TODO: find constants
|
||||
|
||||
/**
|
||||
* @param CommandEnum $enum
|
||||
* @param int $valueOffset
|
||||
* @param int[] $constraints
|
||||
*/
|
||||
public function __construct(CommandEnum $enum, int $valueOffset, array $constraints){
|
||||
|
||||
@@ -83,8 +83,6 @@ class NetworkInventoryAction{
|
||||
public $newItem;
|
||||
|
||||
/**
|
||||
* @param InventoryTransactionPacket $packet
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function read(InventoryTransactionPacket $packet){
|
||||
@@ -114,7 +112,6 @@ class NetworkInventoryAction{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param InventoryTransactionPacket $packet
|
||||
* @return void
|
||||
*/
|
||||
public function write(InventoryTransactionPacket $packet){
|
||||
@@ -142,8 +139,6 @@ class NetworkInventoryAction{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Player $player
|
||||
*
|
||||
* @return InventoryAction|null
|
||||
*
|
||||
* @throws \UnexpectedValueException
|
||||
|
||||
@@ -129,12 +129,6 @@ final class RuntimeBlockMapping{
|
||||
return $table;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param int $meta
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public static function toStaticRuntimeId(int $id, int $meta = 0) : int{
|
||||
self::lazyInit();
|
||||
/*
|
||||
@@ -146,8 +140,6 @@ final class RuntimeBlockMapping{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $runtimeId
|
||||
*
|
||||
* @return int[] [id, meta]
|
||||
*/
|
||||
public static function fromStaticRuntimeId(int $runtimeId) : array{
|
||||
|
||||
@@ -32,17 +32,11 @@ interface SkinAdapter{
|
||||
|
||||
/**
|
||||
* Allows you to convert a skin entity to skin data.
|
||||
*
|
||||
* @param Skin $skin
|
||||
* @return SkinData
|
||||
*/
|
||||
public function toSkinData(Skin $skin) : SkinData;
|
||||
|
||||
/**
|
||||
* Allows you to convert skin data to a skin entity.
|
||||
*
|
||||
* @param SkinData $data
|
||||
* @return Skin
|
||||
*/
|
||||
public function fromSkinData(SkinData $data) : Skin;
|
||||
}
|
||||
|
||||
@@ -44,8 +44,6 @@ class SkinAnimation{
|
||||
|
||||
/**
|
||||
* Image of the animation.
|
||||
*
|
||||
* @return SkinImage
|
||||
*/
|
||||
public function getImage() : SkinImage{
|
||||
return $this->image;
|
||||
@@ -53,8 +51,6 @@ class SkinAnimation{
|
||||
|
||||
/**
|
||||
* The type of animation you are applying.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getType() : int{
|
||||
return $this->type;
|
||||
@@ -62,8 +58,6 @@ class SkinAnimation{
|
||||
|
||||
/**
|
||||
* The total amount of frames in an animation.
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getFrames() : float{
|
||||
return $this->frames;
|
||||
|
||||
@@ -49,17 +49,7 @@ class SkinData{
|
||||
private $capeId;
|
||||
|
||||
/**
|
||||
* @param string $skinId
|
||||
* @param string $resourcePatch
|
||||
* @param SkinImage $skinImage
|
||||
* @param SkinAnimation[] $animations
|
||||
* @param SkinImage|null $capeImage
|
||||
* @param string $geometryData
|
||||
* @param string $animationData
|
||||
* @param bool $premium
|
||||
* @param bool $persona
|
||||
* @param bool $personaCapeOnClassic
|
||||
* @param string $capeId
|
||||
*/
|
||||
public function __construct(string $skinId, string $resourcePatch, SkinImage $skinImage, array $animations = [], SkinImage $capeImage = null, string $geometryData = "", string $animationData = "", bool $premium = false, bool $persona = false, bool $personaCapeOnClassic = false, string $capeId = ""){
|
||||
$this->skinId = $skinId;
|
||||
@@ -75,23 +65,14 @@ class SkinData{
|
||||
$this->capeId = $capeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getSkinId() : string{
|
||||
return $this->skinId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getResourcePatch() : string{
|
||||
return $this->resourcePatch;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return SkinImage
|
||||
*/
|
||||
public function getSkinImage() : SkinImage{
|
||||
return $this->skinImage;
|
||||
}
|
||||
@@ -103,51 +84,30 @@ class SkinData{
|
||||
return $this->animations;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return SkinImage
|
||||
*/
|
||||
public function getCapeImage() : SkinImage{
|
||||
return $this->capeImage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getGeometryData() : string{
|
||||
return $this->geometryData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getAnimationData() : string{
|
||||
return $this->animationData;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isPersona() : bool{
|
||||
return $this->persona;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isPremium() : bool{
|
||||
return $this->premium;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isPersonaCapeOnClassic() : bool{
|
||||
return $this->personaCapeOnClassic;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCapeId() : string{
|
||||
return $this->capeId;
|
||||
}
|
||||
|
||||
@@ -96,11 +96,6 @@ class QueryHandler{
|
||||
}
|
||||
|
||||
/**
|
||||
* @param AdvancedSourceInterface $interface
|
||||
* @param string $address
|
||||
* @param int $port
|
||||
* @param string $packet
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function handle(AdvancedSourceInterface $interface, string $address, int $port, string $packet){
|
||||
|
||||
@@ -75,11 +75,7 @@ class RCONInstance extends Thread{
|
||||
|
||||
/**
|
||||
* @param resource $socket
|
||||
* @param string $password
|
||||
* @param int $maxClients
|
||||
* @param \ThreadedLogger $logger
|
||||
* @param resource $ipcSocket
|
||||
* @param null|SleeperNotifier $notifier
|
||||
*/
|
||||
public function __construct($socket, string $password, int $maxClients = 50, \ThreadedLogger $logger, $ipcSocket, ?SleeperNotifier $notifier){
|
||||
$this->stop = false;
|
||||
@@ -97,9 +93,6 @@ class RCONInstance extends Thread{
|
||||
|
||||
/**
|
||||
* @param resource $client
|
||||
* @param int $requestID
|
||||
* @param int $packetType
|
||||
* @param string $payload
|
||||
*
|
||||
* @return int|false
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user