mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Merge branch 'release/3.2'
This commit is contained in:
commit
1177a381c8
@ -2824,10 +2824,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
}
|
||||
|
||||
try{
|
||||
$next = $this->forms[$formId]->handleResponse($this, $responseData);
|
||||
if($next !== null){
|
||||
$this->sendForm($next);
|
||||
}
|
||||
$this->forms[$formId]->handleResponse($this, $responseData);
|
||||
}catch(FormValidationException $e){
|
||||
$this->server->getLogger()->critical("Failed to validate form " . get_class($this->forms[$formId]) . ": " . $e->getMessage());
|
||||
$this->server->getLogger()->logException($e);
|
||||
|
@ -37,8 +37,7 @@ interface Form extends \JsonSerializable{
|
||||
* @param Player $player
|
||||
* @param mixed $data
|
||||
*
|
||||
* @return Form|null a form which will be opened immediately (before queued forms) as a response to this form, or null if not applicable.
|
||||
* @throws FormValidationException
|
||||
* @throws FormValidationException if the data could not be processed
|
||||
*/
|
||||
public function handleResponse(Player $player, $data) : ?Form;
|
||||
public function handleResponse(Player $player, $data) : void;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user