Added typehints and PhpDoc for events API

excluded blocks and entities events API to avoid merge conflicts
This commit is contained in:
Dylan K. Taylor
2017-07-05 16:42:06 +01:00
parent 6504fdabab
commit 6cd4d2c5a2
57 changed files with 461 additions and 198 deletions

View File

@ -35,16 +35,26 @@ class PlayerPreLoginEvent extends PlayerEvent implements Cancellable{
/** @var string */
protected $kickMessage;
public function __construct(Player $player, $kickMessage){
/**
* @param Player $player
* @param string $kickMessage
*/
public function __construct(Player $player, string $kickMessage){
$this->player = $player;
$this->kickMessage = $kickMessage;
}
public function setKickMessage($kickMessage){
/**
* @param string $kickMessage
*/
public function setKickMessage(string $kickMessage){
$this->kickMessage = $kickMessage;
}
public function getKickMessage(){
/**
* @return string
*/
public function getKickMessage() : string{
return $this->kickMessage;
}