mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Forms API, part 1: add Player->sendForm() and Form interface
There's no implementation here yet, but that can come later. This lays the ground for allowing plugins to have an integrated method to send forms, as well as a solution to the ID conflict problem. A built in implementation should not be a concretion and it should be able to be swapped for third party implementations. This enables the possiblity to do so.
This commit is contained in:
@ -239,7 +239,7 @@ class PlayerNetworkSessionAdapter extends NetworkSession{
|
||||
}
|
||||
|
||||
public function handleModalFormResponse(ModalFormResponsePacket $packet) : bool{
|
||||
return false; //TODO: GUI stuff
|
||||
return $this->player->onFormSubmit($packet->formId, json_decode($packet->formData, true));
|
||||
}
|
||||
|
||||
public function handleServerSettingsRequest(ServerSettingsRequestPacket $packet) : bool{
|
||||
|
Reference in New Issue
Block a user