Phpcraft
Public Member Functions | Public Attributes | List of all members
Phpcraft\Event\ServerRotationEvent Class Reference
Inheritance diagram for Phpcraft\Event\ServerRotationEvent:
Inheritance graph
[legend]
Collaboration diagram for Phpcraft\Event\ServerRotationEvent:
Collaboration graph
[legend]

Public Member Functions

 __construct (Server $server, ClientConnection $client, ?float $prev_yaw=null, ?float $prev_pitch=null)
 
- Public Member Functions inherited from Phpcraft\Event\ServerClientEvent
 __construct (Server $server, ClientConnection $client)
 
- Public Member Functions inherited from Phpcraft\Event\ServerEvent
 __construct (Server $server)
 

Public Attributes

 $prev_yaw
 
 $prev_pitch
 
- Public Attributes inherited from Phpcraft\Event\ServerClientEvent
 $client
 
- Public Attributes inherited from Phpcraft\Event\ServerEvent
 $server
 

Detailed Description

Fired when a client rotates. Cancellable. Cancelling the event rotates the client the way they were before this event.

Constructor & Destructor Documentation

◆ __construct()

Phpcraft\Event\ServerRotationEvent::__construct ( Server  $server,
ClientConnection  $client,
?float  $prev_yaw = null,
?float  $prev_pitch = null 
)

Member Data Documentation

◆ $prev_pitch

float null Phpcraft\Event\ServerRotationEvent::$prev_pitch

The client's pitch before this event.

◆ $prev_yaw

float null Phpcraft\Event\ServerRotationEvent::$prev_yaw

The client's yaw before this event.