mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 08:35:20 +00:00
Align PhpDoc @param tags according to PHP-CS-Fixer
This commit is contained in:
@ -643,7 +643,7 @@ class World implements ChunkManager{
|
||||
* Returns a list of players who are in the given filter and also using the chunk containing the target position.
|
||||
* Used for broadcasting sounds and particles with specific targets.
|
||||
*
|
||||
* @param Player[] $allowed
|
||||
* @param Player[] $allowed
|
||||
* @phpstan-param list<Player> $allowed
|
||||
*
|
||||
* @return array<int, Player>
|
||||
@ -1634,8 +1634,8 @@ class World implements ChunkManager{
|
||||
* Note: If you're using this for performance-sensitive code, and you're guaranteed to be supplying ints in the
|
||||
* specified vector, consider using {@link getBlockAt} instead for better performance.
|
||||
*
|
||||
* @param bool $cached Whether to use the block cache for getting the block (faster, but may be inaccurate)
|
||||
* @param bool $addToCache Whether to cache the block object created by this method call.
|
||||
* @param bool $cached Whether to use the block cache for getting the block (faster, but may be inaccurate)
|
||||
* @param bool $addToCache Whether to cache the block object created by this method call.
|
||||
*/
|
||||
public function getBlock(Vector3 $pos, bool $cached = true, bool $addToCache = true) : Block{
|
||||
return $this->getBlockAt((int) floor($pos->x), (int) floor($pos->y), (int) floor($pos->z), $cached, $addToCache);
|
||||
@ -1647,7 +1647,7 @@ class World implements ChunkManager{
|
||||
* Note for plugin developers: If you are using this method a lot (thousands of times for many positions for
|
||||
* example), you may want to set addToCache to false to avoid using excessive amounts of memory.
|
||||
*
|
||||
* @param bool $cached Whether to use the block cache for getting the block (faster, but may be inaccurate)
|
||||
* @param bool $cached Whether to use the block cache for getting the block (faster, but may be inaccurate)
|
||||
* @param bool $addToCache Whether to cache the block object created by this method call.
|
||||
*/
|
||||
public function getBlockAt(int $x, int $y, int $z, bool $cached = true, bool $addToCache = true) : Block{
|
||||
@ -1794,7 +1794,7 @@ class World implements ChunkManager{
|
||||
* Tries to break a block using a item, including Player time checks if available
|
||||
* It'll try to lower the durability if Item is a tool, and set it to Air if broken.
|
||||
*
|
||||
* @param Item $item reference parameter (if null, can break anything)
|
||||
* @param Item $item reference parameter (if null, can break anything)
|
||||
* @phpstan-param-out Item $item
|
||||
*/
|
||||
public function useBreakOn(Vector3 $vector, Item &$item = null, ?Player $player = null, bool $createParticles = false) : bool{
|
||||
@ -1896,8 +1896,8 @@ class World implements ChunkManager{
|
||||
/**
|
||||
* Uses a item on a position and face, placing it or activating the block
|
||||
*
|
||||
* @param Player|null $player default null
|
||||
* @param bool $playSound Whether to play a block-place sound if the block was placed successfully.
|
||||
* @param Player|null $player default null
|
||||
* @param bool $playSound Whether to play a block-place sound if the block was placed successfully.
|
||||
*/
|
||||
public function useItemOn(Vector3 $vector, Item &$item, int $face, ?Vector3 $clickVector = null, ?Player $player = null, bool $playSound = false) : bool{
|
||||
$blockClicked = $this->getBlock($vector);
|
||||
@ -2092,8 +2092,8 @@ class World implements ChunkManager{
|
||||
/**
|
||||
* Returns the closest Entity to the specified position, within the given radius.
|
||||
*
|
||||
* @param string $entityType Class of entity to use for instanceof
|
||||
* @param bool $includeDead Whether to include entitites which are dead
|
||||
* @param string $entityType Class of entity to use for instanceof
|
||||
* @param bool $includeDead Whether to include entitites which are dead
|
||||
* @phpstan-template TEntity of Entity
|
||||
* @phpstan-param class-string<TEntity> $entityType
|
||||
*
|
||||
|
Reference in New Issue
Block a user