Skip to content

Commit

Permalink
Add more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergittos authored Jul 20, 2024
1 parent 6735ef1 commit 9315fd8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/player/Player.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,15 @@ public function isFlying() : bool{
/**
* Sets the player's speed when flying.
*
* The flight speed is calculated as `blocks per tick = flightSpeed * 10`. For example, setting the
* flight speed to 0.05 means the player will fly at approximately 0.5 blocks per tick.
*
* If set to zero, the player will not be able to move in the xz plane when flying, and negative values
* will invert the controls.
*
* Note: The value of the movement speed attribute has no effect on the flight speed.
* Notes:
* - The value of the movement speed attribute has no effect on the flight speed.
* - When a player sprints while flying, their flight speed is doubled on the client-side.
*/
public function setFlightSpeed(float $flightSpeed) : void{
if($this->flightSpeed !== $flightSpeed){
Expand All @@ -526,6 +531,9 @@ public function setFlightSpeed(float $flightSpeed) : void{
/**
* Returns the player's speed when flying.
*
* The flight speed is calculated as `blocks per tick = flightSpeed * 10`. For example, if the
* flight speed is set to 0.05, the player will fly at approximately 0.5 blocks per tick.
*
* If zero, the player is not be able to move in the xz plane when flying, and negative values
* will invert the controls.
*/
Expand Down

0 comments on commit 9315fd8

Please sign in to comment.