mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +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{
|
try{
|
||||||
$next = $this->forms[$formId]->handleResponse($this, $responseData);
|
$this->forms[$formId]->handleResponse($this, $responseData);
|
||||||
if($next !== null){
|
|
||||||
$this->sendForm($next);
|
|
||||||
}
|
|
||||||
}catch(FormValidationException $e){
|
}catch(FormValidationException $e){
|
||||||
$this->server->getLogger()->critical("Failed to validate form " . get_class($this->forms[$formId]) . ": " . $e->getMessage());
|
$this->server->getLogger()->critical("Failed to validate form " . get_class($this->forms[$formId]) . ": " . $e->getMessage());
|
||||||
$this->server->getLogger()->logException($e);
|
$this->server->getLogger()->logException($e);
|
||||||
|
@ -37,8 +37,7 @@ interface Form extends \JsonSerializable{
|
|||||||
* @param Player $player
|
* @param Player $player
|
||||||
* @param mixed $data
|
* @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 if the data could not be processed
|
||||||
* @throws FormValidationException
|
|
||||||
*/
|
*/
|
||||||
public function handleResponse(Player $player, $data) : ?Form;
|
public function handleResponse(Player $player, $data) : void;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user